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

Add a job to the queue of this multi&hyphen;priority thread pool indicated by the specified `jobFunction` and associated `jobData`, assigning it the specified `priority`&period; Return 0 if the job was enqueued successfully, and a non&hyphen;zero value otherwise (implying that the queue was in the disabled state)&period; When invoked, `jobFunction` is passed the `void &ast;` address `jobData` as its only argument&period; The behavior is undefined unless `jobFunction` is non&hyphen;null and `0 &lt;&equals; priority &lt; numPriorities()`&period; Note that `jobData` may be 0 as long as `jobFunction` supports that value&period;

== Synopsis

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

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


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