[#BloombergLP-bslmt-TimedCompletionGuard-2constructor-0d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslmt.adoc[bslmt]::xref:BloombergLP/bslmt/TimedCompletionGuard.adoc[TimedCompletionGuard]::TimedCompletionGuard :relfileprefix: ../../../ :mrdocs: Create a timed completion guard that invokes `function` on expiration. == Synopsis Declared in `<bslmt_timedcompletionguard.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- TimedCompletionGuard( xref:BloombergLP/bslmt/TimedCompletionGuard/Handler.adoc[Handler] function, xref:BloombergLP/bslmt/TimedCompletionGuard/allocator_type.adoc[allocator_type] const& basicAllocator = allocator_type()); ---- == Description Create the guard using the specified `function` handler invoked when a set duration expires. Optionally specify a `basicAllocator` used to supply memory. If `basicAllocator` is not specified, the currently installed default allocator is used. == Parameters [cols="1,4"] |=== | Name| Description | *function* | handler invoked when a set duration expires | *basicAllocator* | allocator used to supply memory |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#