<mailbox> ( -- mailbox )
Mailboxes

Prev:mailbox
Next:mailbox-get ( mailbox -- obj )


Vocabulary
concurrency.mailboxes

Inputs
None

Outputs
mailboxa mailbox


Word description
A mailbox is an object that can be used for safe thread communication. Items can be put in the mailbox and retrieved in a FIFO order. If the mailbox is empty when a get operation is performed, then the thread will block until another thread places something in the mailbox. If multiple threads are waiting on the same mailbox, only one of the waiting threads will be unblocked to thread the get operation.

Definition