Handbook
Glossary
mailbox-get? ( mailbox pred -- obj )
Mailboxes
Prev:
mailbox-get-timeout ( mailbox timeout -- obj )
Next:
mailbox-get-timeout? ( mailbox timeout pred -- obj )
Vocabulary
concurrency
.
mailboxes
Inputs
mailbox
a
mailbox
pred
a
quotation
with stack effect
( obj -- ? )
Outputs
obj
an
object
Word description
Get the first item in the mailbox which satisfies the predicate. When the predicate returns true that item will be returned. If nothing in the mailbox satisfies the predicate then the thread will block until something does.
Definition
USING:
kernel
;
IN:
concurrency.mailboxes
:
mailbox-get?
( mailbox pred -- obj )
f
swap
mailbox-get-timeout?
;
inline