Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit 886930d6a2.
PrevUpHomeNext

cancel_after

Create a partial completion token adapter that cancels an operation if not complete before the specified relative timeout has elapsed.

template<
    typename Rep,
    typename Period>
partial_cancel_after< chrono::steady_clock > cancel_after(
    const chrono::duration< Rep, Period > & timeout,
    cancellation_type_t cancel_type = cancellation_type::terminal);
  » more...

template<
    typename Clock,
    typename WaitTraits,
    typename Executor,
    typename Rep,
    typename Period>
partial_cancel_after_timer< Clock, WaitTraits, Executor > cancel_after(
    basic_waitable_timer< Clock, WaitTraits, Executor > & timer,
    const chrono::duration< Rep, Period > & timeout,
    cancellation_type_t cancel_type = cancellation_type::terminal);
  » more...

Adapt a completion token to cancel an operation if not complete before the specified relative timeout has elapsed.

template<
    typename Rep,
    typename Period,
    typename CompletionToken>
cancel_after_t< decay_t< CompletionToken >, chrono::steady_clock > cancel_after(
    const chrono::duration< Rep, Period > & timeout,
    CompletionToken && completion_token);
  » more...

template<
    typename Rep,
    typename Period,
    typename CompletionToken>
cancel_after_t< decay_t< CompletionToken >, chrono::steady_clock > cancel_after(
    const chrono::duration< Rep, Period > & timeout,
    cancellation_type_t cancel_type,
    CompletionToken && completion_token);
  » more...

template<
    typename Clock,
    typename WaitTraits,
    typename Executor,
    typename Rep,
    typename Period,
    typename CompletionToken>
cancel_after_timer< decay_t< CompletionToken >, Clock, WaitTraits, Executor > cancel_after(
    basic_waitable_timer< Clock, WaitTraits, Executor > & timer,
    const chrono::duration< Rep, Period > & timeout,
    CompletionToken && completion_token);
  » more...

template<
    typename Clock,
    typename WaitTraits,
    typename Executor,
    typename Rep,
    typename Period,
    typename CompletionToken>
cancel_after_timer< decay_t< CompletionToken >, chrono::steady_clock > cancel_after(
    basic_waitable_timer< Clock, WaitTraits, Executor > & timer,
    const chrono::duration< Rep, Period > & timeout,
    cancellation_type_t cancel_type,
    CompletionToken && completion_token);
  » more...
Requirements

Header: boost/asio/cancel_after.hpp

Convenience header: boost/asio.hpp


PrevUpHomeNext