BloombergLP::bdlmt::FixedThreadPool::tryEnqueueJob

tryEnqueueJob overloads

Synopses

Declared in <bdlmt_fixedthreadpool.h>

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

int
tryEnqueueJob(bslmf::MovableRef<Job> functor);
» more...

Try to enqueue functor for execution by the next available thread.

int
tryEnqueueJob(Job const& functor);
» more...

Try to enqueue function with userData without blocking.

int
tryEnqueueJob(
    FixedThreadPoolJobFunc function,
    void* userData);
» more...

Return Value

0 on success, and a non-zero value if the queue is full or disabled

Parameters

NameDescription
functorjob to execute, moved into the queue
functionjob function to enqueue
userDataopaque pointer passed to function