This class provides a mechanism route messages received on a named pipe to the registered handler (functor).
Declared in <balb_pipetaskmanager.h>
class PipeTaskManager;
| Name | Description |
|---|---|
PipeTaskManager [constructor] | Constructors |
~PipeTaskManager [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. |
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. |
controlManager | controlManager overloads |
pipeName | Return the path of the named pipe used by the implementation. The behavior is undefined unless the task manager has been started. |
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. |
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. |
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. |
operator BloombergLP::bslmf::NestedTraitDeclaration<PipeTaskManager, UsesBslmaAllocator> | Declare that this type uses a bslma allocator. |