September 2017
Beginner to intermediate
396 pages
9h 46m
English
We use MVar t as a mutable location, that is either empty or contains a value of type t. We also use Chan which wraps up MVar as a stream. A Chan represents a FIFO stream. In this recipe, we use Chan to send orders simultaneously from multiple threads to a single channel Exchange. We then use backend processor processOrder which uses an MVar for aggregating all these orders by in a single Map. The following diagram, explains the order processing system:

Read now
Unlock full access