I am looking for a cross-platform C++ master/worker library or work queue library. The general idea is that my application would create some sort of Task or Work objects, pass them to the work master or work queue, which would in turn execute the work in separate threads or processes. To provide a bit of context, the application is a CD ripper, and the the tasks that I want to parallelize are things like "rip track", "encode WAV to Mp3", etc.
My basic requirements are:
- Must support a configurable number of concurrent tasks.
- Must support dependencies between tasks, such that tasks are not executed until all tasks that they depend on have completed.
- Must allow for cancellation of tasks (or at least not prevent me from coding cancellation into my own tasks).
- Must allow for reporting of status and progress information back to the main application thread.
- Must work on Windows, Mac OS X, and Linux
- Must be open source.
It would be especially nice if this library also:
- Integrated with Qt's signal/slot mechanism.
- Supported the use of threads or processes for executing tasks.
By way of analogy, I'm looking for something similar to Java's ExecutorService or some other similar thread pooling library, but in cross-platform C++. Does anyone know of such a beast?
Thanks!