[#BloombergLP-bdlmt-SignalerConnectionGuard-2constructor-0f]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlmt.adoc[bdlmt]::xref:BloombergLP/bdlmt/SignalerConnectionGuard.adoc[SignalerConnectionGuard]::SignalerConnectionGuard
:relfileprefix: ../../../
:mrdocs:

Create a guard that manages the same slot as `connection`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
SignalerConnectionGuard(
    xref:BloombergLP/bdlmt/SignalerConnection.adoc[SignalerConnection] const& connection,
    bool waitOnDisconnect = false);
----

== Description

Create a `SignalerConnectionGuard` object that refers to and assumes management of the same slot, if any, as the specified `connection` object&period; Upon destruction or assignment, the optionally specified `waitOnDisconnect` determines whether `disconnect` or `disconnectAndWait` will be called on the slot managed by this object, if any&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *connection*
| connection whose slot this guard will manage
| *waitOnDisconnect*
| if `true`, use `disconnectAndWait` on release
|===


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