enqueueJob overloads

Synopses

Declared in <bdlmt_threadpool.h>

Same as the preceding overload, moving functor into the queue.

Enqueue functor for execution by a worker thread.

int
enqueueJob(Job const& functor);

Enqueue function with userData for execution by a worker thread.

int
enqueueJob(
    ThreadPoolJobFunc function,
    void* userData);

Return Value

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

Parameters

Name

Description

functor

job to move onto the queue

function

job function to enqueue

userData

opaque pointer passed to function

Created with MrDocs