[#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 `<bdlmt_multiprioritythreadpool.h>` Add the specified `job` to the queue of this multi‐priority thread pool, assigning it the specified `priority`. Return 0 if the job was enqueued successfully, and a non‐zero value otherwise (implying that the queue was in the disabled state). The behavior is undefined unless `0 <= priority < numPriorities()`. [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..._]# Add a job to the queue of this multi‐priority thread pool indicated by the specified `jobFunction` and associated `jobData`, assigning it the specified `priority`. Return 0 if the job was enqueued successfully, and a non‐zero value otherwise (implying that the queue was in the disabled state). When invoked, `jobFunction` is passed the `void *` address `jobData` as its only argument. The behavior is undefined unless `jobFunction` is non‐null and `0 <= priority < numPriorities()`. Note that `jobData` may be 0 as long as `jobFunction` supports that value. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- int xref:BloombergLP/bdlmt/MultipriorityThreadPool/enqueueJob-08.adoc[enqueueJob]( xref:BloombergLP/bslmt_ThreadFunction.adoc[bslmt_ThreadFunction] jobFunction, void* jobData, int priority); ---- [.small]#xref:BloombergLP/bdlmt/MultipriorityThreadPool/enqueueJob-08.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#