[#BloombergLP-bdlmt-FixedThreadPool-tryEnqueueJob-0a5]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/FixedThreadPool.adoc[FixedThreadPool]::tryEnqueueJob
:relfileprefix: ../../../
:mrdocs:

Enqueue the specified `function` to be executed by the next available thread&period; The specified `userData` pointer will be passed to the function by the processing thread&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; Specifically, return `e&lowbar;SUCCESS` on success, `e&lowbar;DISABLED` if `!isEnabled()`, `e&lowbar;FULL` if `isEnabled()` and the underlying queue was full, and `e&lowbar;FAILED` if an error occurs&period; The behavior is undefined unless `function` is not null&period;

== Synopsis

Declared in `&lt;bdlmt&lowbar;fixedthreadpool&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
tryEnqueueJob(
    xref:BloombergLP/bdlmt/FixedThreadPoolJobFunc.adoc[FixedThreadPoolJobFunc] function,
    void* userData);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
