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

`tryEnqueueJob` overloads

== Synopses

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

Same as the preceding overload, moving `functor` into the queue&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlmt/FixedThreadPool/tryEnqueueJob-0a0.adoc[tryEnqueueJob](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;Job&gt;] functor);
----

[.small]#xref:BloombergLP/bdlmt/FixedThreadPool/tryEnqueueJob-0a0.adoc[_» more&period;&period;&period;_]#

Try to enqueue `functor` for execution by the next available thread&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlmt/FixedThreadPool/tryEnqueueJob-09.adoc[tryEnqueueJob](xref:BloombergLP/bdlmt/FixedThreadPool/Job.adoc[Job] const& functor);
----

[.small]#xref:BloombergLP/bdlmt/FixedThreadPool/tryEnqueueJob-09.adoc[_» more&period;&period;&period;_]#

Try to enqueue `function` with `userData` without blocking&period;


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

[.small]#xref:BloombergLP/bdlmt/FixedThreadPool/tryEnqueueJob-0a5.adoc[_» more&period;&period;&period;_]#

== Return Value

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *functor*
| job to execute, moved into the queue
| *function*
| job function to enqueue
| *userData*
| opaque pointer passed to `function`
|===


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