Try to enqueue function with userData without blocking.
Synopsis
Declared in <bdlmt_fixedthreadpool.h>
int
tryEnqueueJob(
FixedThreadPoolJobFunc function,
void* userData);
Description
Try to enqueue function/`userData` for the next available thread.
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 on success, and a non‐zero value otherwise. Specifically, return e_SUCCESS on success, e_DISABLED if !isEnabled(), e_FULL if isEnabled() and the underlying queue was full, and e_FAILED if an error occurs. The behavior is undefined unless function is not null.
Return Value
0 on success, and a non‐zero value if the queue is full or disabled
Parameters
Name |
Description |
function |
job function to enqueue |
userData |
opaque pointer passed to |
Created with MrDocs