Enqueue function with userData for execution by a worker thread.

Synopsis

Declared in <bdlmt_threadpool.h>

int
enqueueJob(
    ThreadPoolJobFunc function,
    void* userData);

Description

Enqueue the specified function to be executed by the next available thread. The specified userData pointer will be passed to the function by the processing thread. Return 0 if enqueued successfully, and a non‐zero value if queuing is currently disabled.

Return Value

0 if enqueued successfully, and a non‐zero value if queuing is disabled

Parameters

Name

Description

function

job function to enqueue

userData

opaque pointer passed to function

Created with MrDocs