haskell-distributed / distributed-process-client-server

Cloud Haskell - gen_server implementation
http://haskell-distributed.github.io
BSD 3-Clause "New" or "Revised" License
13 stars 11 forks source link

Safe Handler Execution #17

Closed hyperthunk closed 7 years ago

hyperthunk commented 7 years ago

Evaluating safe or apiSafe in a 'filters' block allows the user to mark certain messages for safe handling. When marked thus, any matching handlers for these messages are evaluated without fully de-queueing the message from the priority queue, such that if we receive and handle (i.e. swallow) an exit signal, the message will be available for re-processing. Only once a message has been safely processed will it be fully dequeued from the internal mailbox/queue.