I am looking for a C/C++ implementation of a multi threaded job dispatcher.
Boss thread (the main function) reads the job (eg executing msgrcv in a while(1) loop).
The boss reads the new job and depending on the destination dispatches the job to the
corresponding thread. The worker thread executes the job.
I don’t have the time to build it from scratch, I am looking a ready solution.
UPDATE: I cannot use boost. It must be in pthreads (Linux)
Sound like you’re after a thread pool. One can be found here (it requires boost). I’m sure Googling for “thread pool” or something similar will yield other posibilities.