|
Scroom 0.14-49-gb7ae7a6d
|
#include <queue.hh>

Public Types | |
| using | Ptr = std::shared_ptr< QueueImpl > |
Public Member Functions | |
| bool | jobStarted () |
| void | jobFinished () |
| void | deletingQueue () |
| int | getCount () |
Static Public Member Functions | |
| static Ptr | create () |
| QueueImpl. | |
Private Member Functions | |
| QueueImpl ()=default | |
Private Attributes | |
| boost::mutex | mut |
| boost::condition_variable | cond |
| unsigned int | count {0} |
| bool | isDeleted {false} |
ThreadPool::Queue implementation class.
Keeps track of whether the actual ThreadPool::Queue still exists, and whether jobs are currently being executed. When the last reference to the ThreadPool::Queue is being deleted, it calls deletingQueue(), which blocks until all jobs finish executing.
| using Scroom::Detail::ThreadPool::QueueImpl::Ptr = std::shared_ptr<QueueImpl> |
|
privatedefault |
|
static |

| void QueueImpl::deletingQueue | ( | ) |
Indicate that the ThreadPool::Queue is being deleted
This sets isDeleted to true and blocks until all jobs have finished executing.
| int QueueImpl::getCount | ( | ) |
| void QueueImpl::jobFinished | ( | ) |
| bool QueueImpl::jobStarted | ( | ) |
Indicate that a job is being started
| true | if the ThreadPool::Queue still exists |
| false | if the ThreadPool::Queue has been deleted |
|
private |
Gets signaled when a job completes
Referenced by deletingQueue(), and jobFinished().
|
private |
Number of jobs currently running
Referenced by deletingQueue(), getCount(), jobFinished(), and jobStarted().
|
private |
true if the last reference to ThreadPool::Queue goes away
Referenced by deletingQueue(), and jobStarted().
|
private |
Guard internal data
Referenced by deletingQueue(), getCount(), jobFinished(), and jobStarted().