[#BloombergLP-bdlmt-ThreadPool-enqueueJob-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/ThreadPool.adoc[ThreadPool]::enqueueJob
:relfileprefix: ../../../
:mrdocs:

`enqueueJob` overloads

== Synopses

Declared in `&lt;bdlmt&lowbar;threadpool&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/ThreadPool/enqueueJob-0c.adoc[enqueueJob](xref:BloombergLP/bslmf/MovableRef.adoc[bslmf::MovableRef&lt;Job&gt;] functor);
----

[.small]#xref:BloombergLP/bdlmt/ThreadPool/enqueueJob-0c.adoc[_» more&period;&period;&period;_]#

Enqueue the specified `functor` to be executed by the next available thread&period; Return 0 if enqueued successfully, and a non&hyphen;zero value if queuing is currently disabled&period; The behavior is undefined unless `functor` is not &quot;unset&quot;&period; See `bsl&colon;&colon;function` for more information on functors&period;


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

[.small]#xref:BloombergLP/bdlmt/ThreadPool/enqueueJob-0a.adoc[_» more&period;&period;&period;_]#

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 if enqueued successfully, and a non&hyphen;zero value if queuing is currently disabled&period;


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

[.small]#xref:BloombergLP/bdlmt/ThreadPool/enqueueJob-04.adoc[_» more&period;&period;&period;_]#


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