distributed-process
distributed-process copied to clipboard
Document the semantics of receiveWait and similar
Currently the documentation reads:
-- | Test the matches in order against each message in the queue
receiveWait :: [Match b] -> Process b Source
This is not sufficient, I think, to understand how receiveWait works in the presence of multiple messages in the mailbox and multiple match clauses. The order in which matches are done should be stated less succinctly.
I suppose we should also say that this function:
- blocks when no message matches
- it is interruptible when no message matches (can it be interrupted even if some message matches?).
it is interruptible when no message matches (can it be interrupted even if some message matches?).
Yes, and we need to point out that if it is interrupted even if some message matches, the mailbox is not modified...