.. index:: pair: class; EE::detail::CancellationState .. _doxid-class_e_e_1_1detail_1_1_cancellation_state: class EE::detail::CancellationState =================================== .. toctree:: :hidden: struct_EE_detail_CancellationState_Entry.rst Overview ~~~~~~~~ Shared cancellation state. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class CancellationState { public: // typedefs typedef :ref:`SmallUniqueFunction` :target:`Callback`; // structs struct :ref:`Entry`; // methods bool :target:`isCancellationRequested`() const; bool :target:`cancel`(); :ref:`Uint64` :ref:`add`(:ref:`Callback`& callback); void :ref:`remove`(:ref:`Uint64` id); }; .. _details-class_e_e_1_1detail_1_1_cancellation_state: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Shared cancellation state. Owned jointly by the source, tokens and live registrations. Methods ------- .. index:: pair: function; add .. _doxid-class_e_e_1_1detail_1_1_cancellation_state_1a52467089edf9998510875902055edce3: .. ref-code-block:: cpp :class: doxyrest-title-code-block :ref:`Uint64` add(:ref:`Callback`& callback) .. rubric:: Returns: Registration id, or 0 when cancellation already happened (callback not stored). .. index:: pair: function; remove .. _doxid-class_e_e_1_1detail_1_1_cancellation_state_1a44c2fd61b7d4038f27ebe09c0d4f13cf: .. ref-code-block:: cpp :class: doxyrest-title-code-block void remove(:ref:`Uint64` id) Removes the registration. Blocks while its callback is running on another thread.