Seastar
High performance C++ framework for concurrent servers
Classes | Public Member Functions | List of all members
seastar::abort_source::subscription Class Reference

Detailed Description

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>

Inheritance diagram for seastar::abort_source::subscription:

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 >)
 
subscriptionoperator= (subscription &&other) noexcept(std::is_nothrow_move_assignable_v< subscription_callback_type >)
 
 operator bool () const noexcept
 

Member Function Documentation

◆ on_abort()

void seastar::abort_source::subscription::on_abort ( const std::optional< std::exception_ptr > &  ex)
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.


The documentation for this class was generated from the following file: