tryEnqueueJob overloads

Synopses

Declared in <bdlmt_fixedthreadpool.h>

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

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

int
tryEnqueueJob(Job const& functor);

Try to enqueue function with userData without blocking.

int
tryEnqueueJob(
    FixedThreadPoolJobFunc function,
    void* userData);

Return Value

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

Parameters

Name

Description

functor

job to execute, moved into the queue

function

job function to enqueue

userData

opaque pointer passed to function

Created with MrDocs