...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Cancel any asynchronous operations that are waiting on the timer.
std::size_t cancel();
This function forces the completion of any pending asynchronous wait operations against the timer. The handler for each cancelled operation will be invoked with the boost::asio::error::operation_aborted error code.
Cancelling the timer does not change the expiry time.
The number of asynchronous operations that were cancelled.
Thrown on failure.