MailboxProcessor
maintains an internal message queue, where multiple producers can post messages using various Post
method variants. These messages are then retrieved and processed by a single consumer (unless you implement it otherwise) using Retrieve
and Scan
variants. By default both producing and consuming the messages is thread-safe.
By default there is no provided error handling. If an uncaught exception is thrown inside the processor's body, the body function will end, all messages in the queue will be lost, no more messages can be posted and the reply channel (if available) will get an exception instead of a response. You have to provide all error handling yourself in case this behavior does not suit your use case.