Liking cljdoc? Tell your friends :D

loom-otp.mailbox

Mailbox implementation for message passing.

A mailbox is an atom wrapping a persistent queue with watch-based notification for efficient blocking receive.

Mailbox implementation for message passing.

A mailbox is an atom wrapping a persistent queue with watch-based
notification for efficient blocking receive.
raw docstring

mailbox-receive!clj

(mailbox-receive! mb)
(mailbox-receive! mb timeout-ms timeout-val)

Blocking receive from mailbox with optional timeout. Uses atom watch for efficient wake-up on message arrival.

Arities:

  • [mb] - block forever until message arrives
  • [mb timeout-ms timeout-val] - wait up to timeout-ms, return timeout-val on timeout
Blocking receive from mailbox with optional timeout.
Uses atom watch for efficient wake-up on message arrival.

Arities:
- [mb] - block forever until message arrives
- [mb timeout-ms timeout-val] - wait up to timeout-ms, return timeout-val on timeout
sourceraw docstring

mailbox-send!clj

(mailbox-send! mb msg)

Send a message to a mailbox (non-blocking).

Send a message to a mailbox (non-blocking).
sourceraw docstring

make-mailboxclj

(make-mailbox)

Create a new empty mailbox.

Create a new empty mailbox.
sourceraw docstring

maybe-mailbox-receive!clj

(maybe-mailbox-receive! mb)

Non-blocking receive from mailbox. Returns message if available, nil otherwise.

Non-blocking receive from mailbox. Returns message if available, nil otherwise.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close