[#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). == Synopsis Declared in `<balb_pipetaskmanager.h>` [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[`~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. | xref:BloombergLP/balb/PipeTaskManager/allocator.adoc[`allocator`] | Return the allocator used by this object to supply memory. Note that if no allocator was supplied at construction the default allocator in effect at construction is used. | 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. The behavior is undefined unless the task manager has been started. | xref:BloombergLP/balb/PipeTaskManager/shutdown.adoc[`shutdown`] | Stop processing incoming messages by the background thread. If a handler is executing at the time of invocation, that handler is allowed to complete. This method does not block the caller, and the background thread persists until it is joined by a call to `stop`. Note that `shutdown` and `stop` are typically called in succession. | 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. Return 0 on success, and a non‐zero value otherwise. See {Requirements for the Named Pipe} for expectations for `pipeBasename`. After a successful return, calls to `start` fail until `stop` has been called (successfully); afterwards, `start` can be called again with the same or some other `pipeBasename`. Note that the `pipeName()` method provides the (full) pathname to the created named pipe. | 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. Return 0 on success, and a non‐zero value otherwise. If `shutdown` has not been called, this method will block indefinitely until another thread calls `shutdown`. Once `stop` has returned, `start` can be called again with the same or a different named pipe. Note that frequently user code will call `shutdown` and then immediately call `stop` on a `TaskManager` object. | xref:BloombergLP/balb/PipeTaskManager/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration<PipeTaskManager, UsesBslmaAllocator>`] | Declare that this type uses a `bslma` allocator. |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#