Search code examples
c++multithreadingqueuejobs

c++ queue mulithreading wait for jobs completed


Is there a c++ multithreading library in which there is a queue that can contain jobs that have to wait for other jobs to be completed. A threadpool is processing all jobs in the queue.

I want to write a multithreaded c++ program that produces and consumes jobs that are placed in a queue, only some of these jobs can only be processed when some other jobs already have been processed.

Similar like in qsub (grid queue manager), where you can put a job in a queue and that has to hold until other jobs have been finished.


Solution

  • Found what I am looking for:

    Task stealing like implemented in Intel Threading Building Block: http://en.wikipedia.org/wiki/Intel_Threading_Building_Blocks