[#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 a timed completion guard using `failByAbort`&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;


[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 a timed completion guard that invokes `function` on expiration&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;_]#

== Parameters

[cols="1,4"]
|===
| Name| Description
| *basicAllocator*
| allocator used to supply memory
| *function*
| handler invoked when a set duration expires
|===


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