BloombergLP::bdlmt::Signaler

Thread-safe signaler that invokes connected slots via its call operator.

Synopsis

Declared in <bdlmt_signaler.h>

template<class t_PROT>
class Signaler
    : public Signaler_Invocable<Signaler<t_PROT>, t_PROT>

Description

This class template provides a thread-safe signaler that executes connected slots when invoked via its call operator. t_PROT is a function signature and must have a return type of void. The callable objects assigned to the slots may have return types other than void, in which case their return values will be discarded.

Base Classes

NameDescription
Signaler_Invocable<Signaler<t_PROT>, t_PROT>Provides a call operator for the derived class bdlmt::Signaler, such that its call signature is identical to that of t_PROT.

Type Aliases

NameDescription
ResultType Result type of operator(); slot return values are discarded.

Member Functions

NameDescription
Signaler [constructor]Create a Signaler with no connected slots.
~Signaler [destructor]Destroy this object. Call disconnectAllSlots(). The behavior is undefined if this function is invoked from a slot connected to this signaler.
connect Connect slot to this signaler, optionally in group.
disconnectAllSlots Disconnect all slots connected to this signaler without waiting.
disconnectAllSlotsAndWait Disconnect all slots and wait for in-progress signals to finish.
disconnectGroup Disconnect all slots in group without waiting.
disconnectGroupAndWait Disconnect all slots in group and wait for in-progress signals.
slotCount Return the number of slots connected to this signaler.
operator BloombergLP::bslmf::NestedTraitDeclaration<Signaler, UsesBslmaAllocator> Declare that this type uses bslma allocators.

Friends

NameDescription
BloombergLP::bdlmt::Signaler_InvocableProvides a call operator for the derived class bdlmt::Signaler, such that its call signature is identical to that of t_PROT.