[#BloombergLP-bdlmt-FixedThreadPool-tryEnqueueJob-09] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/FixedThreadPool.adoc[FixedThreadPool]::tryEnqueueJob :relfileprefix: ../../../ :mrdocs: Try to enqueue `functor` for execution by the next available thread. == Synopsis Declared in `<bdlmt_fixedthreadpool.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int tryEnqueueJob(xref:BloombergLP/bdlmt/FixedThreadPool/Job.adoc[Job] const& functor); ---- == Description Enqueue the specified `functor` to be executed by the next available 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 `functor` is not null. == Return Value 0 on success, and a non‐zero value if the queue is full or disabled == Parameters [cols="1,4"] |=== | Name| Description | *functor* | job to be executed by a worker thread |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#