[#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 `functor` for execution by a worker thread&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 `function` with `userData` for execution by a worker thread&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;_]#

== Return Value

0 if enqueued successfully, and a non&hyphen;zero value if queuing is disabled

== Parameters

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


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