receive t ~filter ~postcond
apply postcond
to the messages picked by filter
.
Return if postcond
returns true, otherwise keep trying until timeout
becomes
determined, which will raise an exception.
If this returns successfully, the remaining data in the mailbox will be:
swallow
is false.swallow
is true OR if no messages passed the filter.one t f
run receive, asserting that there is exactly one matching message.
two t f
run receive, asserting that there are exactly two matching messages.
many t n f
run receive, asserting that there are exactly n
matching messages.
not_empty t f
run receive, asserting that there is at least one matching message.
clear t
wipes out all previously received messages matching the to_remove
predicate. If to_remove
is not provided, wipes out all the messages.
Immediately after calling clear t
, zero t f
succeeds for any f
.