![]() |
Home | Libraries | People | FAQ | More |
Create a partial completion token adapter that cancels an operation if not complete by the specified absolute time.
template< typename Clock, typename WaitTraits, typename Executor, typename Duration> partial_cancel_at_timer< Clock, WaitTraits, Executor > cancel_at( basic_waitable_timer< Clock, WaitTraits, Executor > & timer, const chrono::time_point< Clock, Duration > & expiry, cancellation_type_t cancel_type = cancellation_type::terminal);
When an asynchronous operation is used with cancel_at, a timer async_wait operation is performed in parallel to the main operation. If this parallel async_wait completes first, a cancellation request is emitted to cancel the main operation. Consequently, the application must ensure that the asynchronous operation is performed within an implicit or explicit strand.