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

`enqueueJob` overloads

== Synopses

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

Enqueue the specified job at the specified priority&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlmt/MultipriorityThreadPool/enqueueJob-05.adoc[enqueueJob](
    xref:BloombergLP/bdlmt/MultipriorityThreadPool/ThreadFunctor.adoc[ThreadFunctor] const& job,
    int priority);
----

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

Enqueue a C&hyphen;style job function at the specified priority&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
int
xref:BloombergLP/bdlmt/MultipriorityThreadPool/enqueueJob-08.adoc[enqueueJob](
    xref:BloombergLP/bslmt_ThreadFunction.adoc[bslmt&lowbar;ThreadFunction] jobFunction,
    void* jobData,
    int priority);
----

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

== Return Value

0 if the job was enqueued, and a non&hyphen;zero value otherwise

== Parameters

[cols="1,4"]
|===
| Name| Description
| *job*
| functor to be executed by a worker thread
| *priority*
| job priority&semi; 0 is most urgent
| *jobFunction*
| C&hyphen;style function invoked as the job
| *jobData*
| pointer passed as the sole argument to `jobFunction`
|===


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