You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 55a4484
Browse filesBrowse the repository at this point in the historyBrowse files
docs: document the listener thread; narrow the no-threads guarantee
"No background threads" was asserted across DESIGN.md and README.md and
is no longer unconditional: none for an executor that waits, one
per-context listener thread for an application that registers a listener
callback. Each assertion now says what it actually guarantees.
DESIGN.md gains "The listener thread: delivery without a wait": why
EventsExecutor deadlocks against wait-only delivery, the lazy start, the
reordering and lost-wakeup hazards and what closes them (drain_mutex, the
per-wait-set delivery fd), the listener_mutex lifetime rule and the
restrictions it implies, that a callback may take from its own endpoint
because callback_mutex is recursive, which context-wide locks exist, and
what the thread deliberately is not. README, test/README and CHANGELOG
follow.
Squashed from:
- docs: document the listener thread; narrow the no-threads guarantee
- docs: fix "edge-driven", describe the per-wait-set delivery fd, drop #64's entry
- docs: correct the drain-safety claim, and log the two blocker fixes
- docs: sweep the claims this stack invalidated but the prose pass missed
- docs: a callback may now take from its own endpoint
- docs: callback_mutex is recursive; listener_mutex is not the only context lock
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NUNQNo26cKRPrVXcaHZnje
Copy file name to clipboardExpand all lines: README.md
+10-4Lines changed: 10 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,8 +4,9 @@ A lightweight, **localhost-only** RMW (ROS Middleware) implementation for ROS 2,
4
4
built on Unix domain sockets and POSIX shared memory instead of DDS.
5
5
6
6
It targets single-machine deployments with many nodes (150+ in production) and a
7
-
small, deterministic resource footprint — no DDS, no daemon, no background
8
-
threads. Discovery is a shared-memory registry; data moves over `AF_UNIX`
7
+
small, deterministic resource footprint — no DDS, no daemon, and no background
8
+
thread unless your executor asks to be called back. Discovery is a shared-memory
9
+
registry; data moves over `AF_UNIX`
9
10
datagram sockets; the wait set is `epoll` + `eventfd`.
10
11
11
12
## When to use it (and when not)
@@ -55,7 +56,8 @@ nodes that need to communicate must select the same RMW — there is no DDS brid
55
56
|**Transport**|`SOCK_DGRAM` Unix domain sockets in `/tmp/ros2_uds/<domain_id>/`. Message boundaries are free; no connection management. |
56
57
|**Discovery**| Single shared-memory file `/dev/shm/ros2_uds_<domain_id>`. No daemon, no multicast. |
57
58
|**Locking**| Lock-free registry (per-slot seqlock + atomic state machine); process-local caches use a plain mutex. |
58
-
|**Wait**|`epoll` over socket fds + `eventfd` guard conditions. **No background threads** — all I/O happens inside `rmw_wait`. |
59
+
|**Wait**|`epoll` over socket fds + `eventfd` guard conditions. I/O happens inside `rmw_wait`, so a waiting executor gets **no background threads**. |
60
+
|**Callbacks**| An endpoint that registers a listener callback is drained by one per-context listener thread, started on that first registration — what `EventsExecutor` needs, since it never calls `rmw_wait`. |
59
61
|**Serialization**| CDR via `fastcdr` + `rosidl_typesupport_fastrtps` (the same path as the DDS RMWs). |
60
62
|**Stale cleanup**| Dead processes are detected via `/proc/<pid>`; their registry entries and socket files are reclaimed on init and on every discovery query. |
61
63
@@ -140,7 +142,11 @@ for the full rationale.
140
142
Localhost only; Linux only; no DDS interoperability. Loaned (zero-copy) messages,
141
143
dynamic message types, network flow endpoints, and content filtering return
142
144
`RMW_RET_UNSUPPORTED`. `deadline`, `lifespan`, and `liveliness` QoS are accepted
143
-
but not enforced. The full list and the reasoning behind each is in
145
+
but not enforced, and no QoS status event (`matched`, incompatible-QoS,
146
+
incompatible-type, `message_lost`) is generated — `rmw_event_type_is_supported`
147
+
returns `false` for every type, so `rclcpp` refuses those event handlers rather
148
+
than holding a dead one. The listener callbacks an `EventsExecutor` needs are
149
+
supported. The full list and the reasoning behind each is in
144
150
[DESIGN.md → Limitations and Unsupported Features](rmw_unix_socket_cpp/DESIGN.md#limitations-and-unsupported-features).
0 commit comments