BloombergLP::bslmt::TimedCompletionGuard::TimedCompletionGuard

Create a timed completion guard that invokes function on expiration.

Synopsis

Declared in <bslmt_timedcompletionguard.h>

TimedCompletionGuard(
    Handler function,
    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

NameDescription
functionhandler invoked when a set duration expires
basicAllocatorallocator used to supply memory