Seastar
High performance C++ framework for concurrent servers
|
Facility to communicate a cancellation request to a fiber. Callbacks can be registered with the abort_source
, which are called atomically with a call to request_abort().
#include <seastar/core/abort_source.hh>
Classes | |
class | subscription |
Public Member Functions | |
optimized_optional< subscription > | subscribe (subscription_callback_type f) noexcept(std::is_nothrow_move_constructible< subscription_callback_type >::value) |
void | request_abort () noexcept |
bool | abort_requested () const noexcept |
Returns whether an abort has been requested. | |
void | check () const |
Throws a abort_requested_exception if cancellation has been requested. | |
|
inlinenoexcept |
Requests that the target operation be aborted. Current subscriptions are invoked inline with this call, and no new ones can be registered.
|
inlinenoexcept |
Delays the invocation of the callback f
until request_abort() is called.
f
, if abort_requested() is false
. Otherwise, returns a disengaged optimized_optional.