Seastar
High performance C++ framework for concurrent servers
|
Represents a handle to the callback registered by a given fiber. Ending the lifetime of the subscription
will unregister the callback, if it hasn't been invoked yet.
#include <seastar/core/abort_source.hh>
Public Member Functions | |
void | on_abort (const std::optional< std::exception_ptr > &ex) noexcept |
subscription (subscription &&other) noexcept(std::is_nothrow_move_constructible_v< subscription_callback_type >) | |
subscription & | operator= (subscription &&other) noexcept(std::is_nothrow_move_assignable_v< subscription_callback_type >) |
operator bool () const noexcept | |
|
inlinenoexcept |
Call the subscribed callback (at most once). This method is called by the abort_source on all listed subscription objects when request_abort() is called. It may be called indepdently by the user at any time, causing the subscription to be unlinked from the abort_source subscriptions list.