![]() |
boost::taar::cancellation_signals::bound_slot — Handle to a slot tied to an executor.
// In header: <boost/taar/core/cancellation_signals.hpp> // Handle to a slot tied to an executor. class bound_slot { public: // public member functions bound_slot() = default; bound_slot(bound_slot &&); bound_slot & operator=(bound_slot &&) noexcept; bound_slot(bound_slot const &) = delete; bound_slot & operator=(bound_slot const &) = delete; ~bound_slot(); boost::asio::cancellation_slot slot() const; void emit(boost::asio::cancellation_type = boost::asio::cancellation_type::all) const; void release(); // private member functions bound_slot(std::shared_ptr< state >, std::shared_ptr< bound_record >); };
Destroying it removes the slot from the pool, so keep it alive for as long as the operation runs (typically by capturing it in the operation's completion handler).
bound_slot public member functionsbound_slot() = default;
bound_slot(bound_slot &&);
bound_slot & operator=(bound_slot && other) noexcept;
bound_slot(bound_slot const &) = delete;
bound_slot & operator=(bound_slot const &) = delete;
~bound_slot();
boost::asio::cancellation_slot slot() const;The cancellation slot to bind to the operation.
void emit(boost::asio::cancellation_type ct = boost::asio::cancellation_type::all) const;Emit on this slot alone, dispatched through its executor.
void release();Remove the slot from the pool now.