Context-aware mailbox: stores [ctx msg] pairs.
This is a pure wrapper around mailbox that handles the [ctx msg] format. It does NOT know about processes - context merging is the caller's responsibility.
Messages are stored as [ctx msg] pairs to enable context propagation for distributed tracing through message chains and exit signals.
Context-aware mailbox: stores [ctx msg] pairs. This is a pure wrapper around mailbox that handles the [ctx msg] format. It does NOT know about processes - context merging is the caller's responsibility. Messages are stored as [ctx msg] pairs to enable context propagation for distributed tracing through message chains and exit signals.
(make-mailbox)Create a new empty context-aware mailbox.
Create a new empty context-aware mailbox.
(maybe-receive! mb)Non-blocking receive from mailbox. Returns [ctx msg] pair, or nil if no message available.
Non-blocking receive from mailbox. Returns [ctx msg] pair, or nil if no message available.
(receive! mb)(receive! mb timeout-ms timeout-val)Blocking receive from mailbox with optional timeout. Returns [ctx msg] pair, or timeout-val if timeout expires.
Blocking receive from mailbox with optional timeout. Returns [ctx msg] pair, or timeout-val if timeout expires.
(send! mb ctx msg)Send message to mailbox, wrapped as [ctx msg].
Send message to mailbox, wrapped as [ctx msg].
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |