[#BloombergLP-balb-PipeTaskManager]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balb.adoc[balb]::PipeTaskManager
:relfileprefix: ../../
:mrdocs:

This class provides a mechanism route messages received on a named pipe to the registered handler (functor)&period;

== Synopsis

Declared in `&lt;balb&lowbar;pipetaskmanager&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class PipeTaskManager;
----

== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/balb/PipeTaskManager/2constructor-09.adoc[`PipeTaskManager`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/balb/PipeTaskManager/2destructor.adoc[`&#126;PipeTaskManager`] [.small]#[destructor]#
| Shutdown message handling, and release the shared reference to the `controlManager` (destroying the `ConstrolManager` and its message handlers if this is the last shared reference), and destroy this object&period;
| xref:BloombergLP/balb/PipeTaskManager/allocator.adoc[`allocator`] 
| Return the allocator used by this object to supply memory&period; Note that if no allocator was supplied at construction the default allocator in effect at construction is used&period;
| xref:BloombergLP/balb/PipeTaskManager/controlManager-0622.adoc[`controlManager`] 
| `controlManager` overloads
| xref:BloombergLP/balb/PipeTaskManager/pipeName.adoc[`pipeName`] 
| Return the path of the named pipe used by the implementation&period; The behavior is undefined unless the task manager has been started&period;
| xref:BloombergLP/balb/PipeTaskManager/shutdown.adoc[`shutdown`] 
| Stop processing incoming messages by the background thread&period; If a handler is executing at the time of invocation, that handler is allowed to complete&period; This method does not block the caller, and the background thread persists until it is joined by a call to `stop`&period; Note that `shutdown` and `stop` are typically called in succession&period;
| xref:BloombergLP/balb/PipeTaskManager/start.adoc[`start`] 
| Create a named pipe using the specified `pipeBasename` (not a pathname), and execute the task manager event processor in a background thread&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; See &lcub;Requirements for the Named Pipe&rcub; for expectations for `pipeBasename`&period; After a successful return, calls to `start` fail until `stop` has been called (successfully)&semi; afterwards, `start` can be called again with the same or some other `pipeBasename`&period; Note that the `pipeName()` method provides the (full) pathname to the created named pipe&period;
| xref:BloombergLP/balb/PipeTaskManager/stop.adoc[`stop`] 
| Block until the background processing thread has shutdown (which must be initiated by a separate call to `shutdown`) then join the background thread, remove the named pipe, and return&period; Return 0 on success, and a non&hyphen;zero value otherwise&period; If `shutdown` has not been called, this method will block indefinitely until another thread calls `shutdown`&period; Once `stop` has returned, `start` can be called again with the same or a different named pipe&period; Note that frequently user code will call `shutdown` and then immediately call `stop` on a `TaskManager` object&period;
| xref:BloombergLP/balb/PipeTaskManager/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;PipeTaskManager, UsesBslmaAllocator&gt;`] 
| Declare that this type uses a `bslma` allocator&period;
|===



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