Handbook
Glossary
mailbox-get-all-timeout ( mailbox timeout -- seq )
Mailboxes
Prev:
mailbox-get-all ( mailbox -- seq )
Next:
mailbox-put ( obj mailbox -- )
Vocabulary
concurrency
.
mailboxes
Inputs
mailbox
a
mailbox
timeout
a
duration
or
f
Outputs
seq
a
sequence
Word description
Blocks the thread for
timeout
if the mailbox is empty, then removes all objects in the mailbox and returns a sequence containing the objects.
Definition
USING:
accessors
deques
kernel
sequences
;
IN:
concurrency.mailboxes
:
mailbox-get-all-timeout
( mailbox timeout -- seq )
block-if-empty
data>>
[
]
collector
[
slurp-deque
]
dip
;