Implementations of some multithread design patterns.
Define a thread that is binded with a callable function, like thread0.run()
Decouple task creation from execution. An executor thread waits on a task queue shared with the rest of the program. Tasks are executed in a FIFO order.
Extension of Reactor: more queues with a parametrizable number of executor threads.