Boost C++ Libraries Home Libraries People FAQ More

PrevUpHomeNext

basic_eager_async_operation::cancel

Cancel the operation.

void cancel(
    cancellation_type_t level = cancellation_type::all);

Requests cancellation of the eagerly-initiated operation by emitting a cancellation signal on the calling thread. This function has no effect if the operation has already been waited on or moved from. To cancel after waiting has begun, bind a cancellation slot to the completion handler.

Remarks

The caller must ensure that the signal is emitted from a context that is safe with respect to the operation's execution, and that the operation's I/O object still exists.


PrevUpHomeNext