okcomps/mailbox provides utilities for manipulating a thread's mailbox. It includes a receive primitive which is similar to erlang's receive.