[#BloombergLP-bslmt-TimedCompletionGuard-2constructor-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/TimedCompletionGuard.adoc[TimedCompletionGuard]::TimedCompletionGuard
:relfileprefix: ../../../
:mrdocs:

Constructors

== Synopses

Declared in `&lt;bslmt&lowbar;timedcompletionguard&period;h&gt;`

Create the guard&period; Optionally specify a `handler` function that is invoked when a `set` duration expires&period; If `handler` is not specified, `failByAbort` is used&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is not specified, the currently installed default allocator is used&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslmt/TimedCompletionGuard/2constructor-02.adoc[TimedCompletionGuard]();
----

[.small]#xref:BloombergLP/bslmt/TimedCompletionGuard/2constructor-02.adoc[_» more&period;&period;&period;_]#

Create the guard using the specified `basicAllocator` to supply memory&period; `failByAbort` is used when a set duration expires&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
explicit
xref:BloombergLP/bslmt/TimedCompletionGuard/2constructor-0a.adoc[TimedCompletionGuard](xref:BloombergLP/bslmt/TimedCompletionGuard/allocator_type.adoc[allocator&lowbar;type] const& basicAllocator);
----

[.small]#xref:BloombergLP/bslmt/TimedCompletionGuard/2constructor-0a.adoc[_» more&period;&period;&period;_]#

Create the guard using the specified `function` handler invoked when a set duration expires&period; Optionally specify a `basicAllocator` used to supply memory&period; If `basicAllocator` is not specified, the currently installed default allocator is used&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bslmt/TimedCompletionGuard/2constructor-0d.adoc[TimedCompletionGuard](
    xref:BloombergLP/bslmt/TimedCompletionGuard/Handler.adoc[Handler] function,
    xref:BloombergLP/bslmt/TimedCompletionGuard/allocator_type.adoc[allocator&lowbar;type] const& basicAllocator = allocator&lowbar;type());
----

[.small]#xref:BloombergLP/bslmt/TimedCompletionGuard/2constructor-0d.adoc[_» more&period;&period;&period;_]#


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