Handbook
Glossary
mailbox
Mailboxes
Next:
<mailbox> ( -- mailbox )
Vocabulary
concurrency
.
mailboxes
Definition
USING:
dlists
;
IN:
concurrency.mailboxes
TUPLE:
mailbox
{
threads
dlist
initial:
DL{
}
}
{
data
dlist
initial:
DL{
}
}
;
Methods
USING:
accessors
concurrency.mailboxes
deques
;
M:
mailbox
mailbox-get-timeout
block-if-empty
data>>
pop-back
;
USING:
accessors
concurrency.conditions
concurrency.mailboxes
deques
kernel
threads
;
M:
mailbox
mailbox-put
[
data>>
push-front
]
[
threads>>
notify-all
]
bi
yield
;