Job queue.
More...
#include <cpl_worker_thread_pool.h>
◆ SubmitJob() [1/2]
bool CPLJobQueue::SubmitJob |
( |
CPLThreadFunc |
pfnFunc, |
|
|
void * |
pData |
|
) |
| |
Queue a new job.
- Parameters
-
pfnFunc | Function to run for the job. |
pData | User data to pass to the job function. |
- Returns
- true in case of success.
◆ SubmitJob() [2/2]
bool CPLJobQueue::SubmitJob |
( |
std::function< void()> |
task | ) |
|
Queue a new job.
- Parameters
-
- Returns
- true in case of success.
◆ WaitCompletion()
void CPLJobQueue::WaitCompletion |
( |
int |
nMaxRemainingJobs = 0 | ) |
|
Wait for completion of part or whole jobs.
- Parameters
-
nMaxRemainingJobs | Maximum number of pendings jobs that are allowed in the queue after this method has completed. Might be 0 to wait for all jobs. |
◆ WaitEvent()
bool CPLJobQueue::WaitEvent |
( |
| ) |
|
Wait for completion for at least one job.
- Returns
- true if there are remaining jobs.
The documentation for this class was generated from the following files: