Keeps a queue of tasks for workers and manages the queue process through its event loop.
The Queue maintains a set of tasks on the queue process by receiving them from the master process. Worker processes can request to pop them off the queue. The communication between these processes is handled inside 'Queue::loop()', the queue process's event loop that polls the Messenger's sockets for incoming messages and handles them when they come.
The reason for this class is to get automatic load balancing between workers. By allowing workers to request tasks whenever they are ready to do work, we don't need to manually distribute work over workers and they will always have something to do until all tasks have been completed. The alternative simple strategy of just distributing all tasks evenly over workers will be suboptimal when tasks have different or even varying runtimes (this simple strategy could be implemented with a PUSH-PULL ZeroMQ socket from master to workers, which would distribute tasks in a round-robin fashion, which, indeed, does not do load balancing).
Definition at line 24 of file Queue.h.