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.
Synopsis
Declared in <bdlmt_signaler.h>
template<class t_PROT>
class Signaler
: public Signaler_Invocable<Signaler<t_PROT>, t_PROT>
Base Classes
Name |
Description |
|
Provides a call operator for the derived class |
Type Aliases
Name |
Member Functions
Name |
Description |
|
Create a |
|
Destroy this object. Call |
Connect the specified |
|
Disconnect all slots, if any, connected to this signaler. Any signals emitted on the corresponding signaler that happen after this call to disconnect completes will not call any slots that were connected prior to this call. Throws nothing. Note that this function does not block the calling thread pending completion of ongoing signals emitted on the signaler. Also note that it is unspecified how many slots, if any, will be called by any invocation on the signaler that begins before this function completes. Also note that if a slot is connected to this signaler during a call to this function, it is unspecified whether that slot will be disconnected. |
|
Disconnect all slots, if any, connected to this signaler. Any signals emitted on the corresponding signaler that happens after this call to disconnect completes will not call any slots that were connected prior to this call. This function blocks the calling thread pending completion of all ongoing signals being emitted on the signaler. Throws nothing. The behavior is undefined if this method is called from a slot connected to the signaler. Note that it is unspecified how many slots, if any, will be called by any invocation on the signaler that begins before this function completes. Also note that if a slot is connected to this signaler during a call to this function, it is unspecified whether that slot will be disconnected. |
|
Disconnect all slots, if any, connected to this signaler in the specified |
|
Disconnect all slots, if any, connected to this signaler in the specified |
|
Return the number of slots connected to this signaler. Note that the value returned by |
|
|
Friends
Name |
Description |
Provides a call operator for the derived class |
Created with MrDocs