[#BloombergLP-bdlmt-Signaler]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::Signaler
:relfileprefix: ../../
:mrdocs:

Thread&hyphen;safe signaler that invokes connected slots via its call operator&period;

== Synopsis

Declared in `&lt;bdlmt&lowbar;signaler&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class t&lowbar;PROT&gt;
class Signaler
    : public xref:BloombergLP/bdlmt/Signaler_Invocable-03.adoc[Signaler&lowbar;Invocable&lt;Signaler&lt;t&lowbar;PROT&gt;, t&lowbar;PROT&gt;]
----

== Description

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

== Base Classes

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlmt/Signaler_Invocable-03.adoc[Signaler&lowbar;Invocable&lt;Signaler&lt;t&lowbar;PROT&gt;, t&lowbar;PROT&gt;]`
| Provides a call operator for the derived class `bdlmt&colon;&colon;Signaler`, such that its call signature is identical to that of `t&lowbar;PROT`&period;
|===

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlmt/Signaler/ResultType.adoc[`ResultType`] 
| Result type of `operator()`&semi; slot return values are discarded&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bdlmt/Signaler/2constructor.adoc[`Signaler`]         [.small]#[constructor]#
| Create a `Signaler` with no connected slots&period;
| xref:BloombergLP/bdlmt/Signaler/2destructor.adoc[`&#126;Signaler`] [.small]#[destructor]#
| Destroy this object&period; Call `disconnectAllSlots()`&period; The behavior is undefined if this function is invoked from a slot connected to this signaler&period;
| xref:BloombergLP/bdlmt/Signaler/connect.adoc[`connect`] 
| Connect `slot` to this signaler, optionally in `group`&period;
| xref:BloombergLP/bdlmt/Signaler/disconnectAllSlots.adoc[`disconnectAllSlots`] 
| Disconnect all slots connected to this signaler without waiting&period;
| xref:BloombergLP/bdlmt/Signaler/disconnectAllSlotsAndWait.adoc[`disconnectAllSlotsAndWait`] 
| Disconnect all slots and wait for in&hyphen;progress signals to finish&period;
| xref:BloombergLP/bdlmt/Signaler/disconnectGroup.adoc[`disconnectGroup`] 
| Disconnect all slots in `group` without waiting&period;
| xref:BloombergLP/bdlmt/Signaler/disconnectGroupAndWait.adoc[`disconnectGroupAndWait`] 
| Disconnect all slots in `group` and wait for in&hyphen;progress signals&period;
| xref:BloombergLP/bdlmt/Signaler/slotCount.adoc[`slotCount`] 
| Return the number of slots connected to this signaler&period;
| xref:BloombergLP/bdlmt/Signaler/2conversion.adoc[`operator BloombergLP::bslmf::NestedTraitDeclaration&lt;Signaler, UsesBslmaAllocator&gt;`] 
| Declare that this type uses `bslma` allocators&period;
|===


== Friends

[cols="1,4"]
|===
| Name| Description
| `xref:BloombergLP/bdlmt/Signaler_Invocable-03.adoc[BloombergLP::bdlmt::Signaler&lowbar;Invocable]`
| Provides a call operator for the derived class `bdlmt&colon;&colon;Signaler`, such that its call signature is identical to that of `t&lowbar;PROT`&period;
|===


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