[#BloombergLP-bdlmt-ThreadMultiplexor-2constructor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/ThreadMultiplexor.adoc[ThreadMultiplexor]::ThreadMultiplexor
:relfileprefix: ../../../
:mrdocs:

Create a thread multiplexor which uses, at most, the specified `maxProcessors` number of threads to process user&hyphen;specified jobs, identified as callbacks of type `Job`&period; Jobs that cannot be processed immediately are placed on a queue having the specified `maxQueueSize` to be processed by the next free thread&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is 0, the currently installed default allocator is used&period; The behavior is undefined unless `0 &lt; maxProcessors` and `0 &lt; maxQueueSize`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
ThreadMultiplexor(
    int maxProcessors,
    int maxQueueSize,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* basicAllocator = 0);
----


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