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

This class implements a guard for work completion within a specified duration&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
class TimedCompletionGuard;
----

== Type Aliases

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmt/TimedCompletionGuard/Handler.adoc[`Handler`] 
| Alias for a pointer to a handler taking a null&hyphen;terminated string&period;
| xref:BloombergLP/bslmt/TimedCompletionGuard/allocator_type.adoc[`allocator&lowbar;type`] 
| Alias indicating this type is allocator&hyphen;aware&period;
|===


== Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmt/TimedCompletionGuard/2constructor-03.adoc[`TimedCompletionGuard`]         [.small]#[constructor]#
| Constructors
| xref:BloombergLP/bslmt/TimedCompletionGuard/2destructor.adoc[`&#126;TimedCompletionGuard`] [.small]#[destructor]#
| Invoke `release` and destroy this guard&period;
| xref:BloombergLP/bslmt/TimedCompletionGuard/get_allocator.adoc[`get&lowbar;allocator`] 
| Return the allocator used to supply memory&period;
| xref:BloombergLP/bslmt/TimedCompletionGuard/guard.adoc[`guard`] 
| Schedule a handler invocation after `duration` unless released&period;
| xref:BloombergLP/bslmt/TimedCompletionGuard/isGuarding.adoc[`isGuarding`] 
| Return `true` if this guard is currently configured with a duration to guard, and `false` otherwise&period;
| xref:BloombergLP/bslmt/TimedCompletionGuard/release.adoc[`release`] 
| If a thread is waiting to alert at expiration of the `set` duration, join the thread, thus preventing any alerting&period;
| xref:BloombergLP/bslmt/TimedCompletionGuard/updateText.adoc[`updateText`] 
| Update the completion&hyphen;guard message text to `text`&period;
|===


== Static Member Functions

[cols="1,4"]
|===
| Name| Description
| xref:BloombergLP/bslmt/TimedCompletionGuard/failByAbort.adoc[`failByAbort`]  [.small]#[noreturn]#
| Abort after logging a diagnostic message built from `text`&period;
|===



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