Download and Install
Full Software Listings
hydroiceutil::JobQueue Class Reference
A queue of jobs to be processed. More...
Inherited by hydroiceutil::EventLoop.
A queue of jobs to be processed.
Rather than tie up the main thread, calls which may take a long time can be placed on this job queue. They will be processed by a pool of threads.
If you need the jobs to communicate results or status updates to their owners, you may want to use the event mechanism,
Constructor & Destructor Documentation
Constructor. For queueSizeWarn>0, a warning will be traced when the queue size exceeds specified size.
Worker threads are started in the constructor.
References hydroiceutil::JobQueue::Config::threadPoolSize, hydroiceutil::JobQueue::Config::traceDoneEvents, hydroiceutil::JobQueue::Config::traceStartEvents, and hydroiceutil::JobQueue::Config::validate().
Member Function Documentation
Stops accepting new jobs, clears all pending jobs, cancels all running jobs and stops the worker pool. Will not return until all workers have stopped. Use this function instead of relying on the destructor to call it if you need to make sure that the thread pool is stopped before other objects (e.g. threads) are destroyed.
Referenced by ~JobQueue().
The documentation for this class was generated from the following files:
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)