GDAL

Public Member Functions | List of all members
CPLJobQueue Class Reference

Job queue. More...

`#include <cpl_worker_thread_pool.h>`

## Public Member Functions
CPLWorkerThreadPool * | GetPool ()
| Return the owning worker thread pool.
bool | SubmitJob (CPLThreadFunc pfnFunc, void *pData)
| Queue a new job.
void | WaitCompletion (int nMaxRemainingJobs=0)
| Wait for completion of part or whole jobs.

## Detailed Description

Job queue.

## Member Function Documentation

## ◆ SubmitJob()

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.

## ◆ 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.

The documentation for this class was generated from the following files:

- cpl_worker_thread_pool.h
- cpl_worker_thread_pool.cpp