.. index:: pair: class; EE::CancellationSource .. _doxid-class_e_e_1_1_cancellation_source: class EE::CancellationSource ============================ .. toctree:: :hidden: Overview ~~~~~~~~ Producer side of a cancellation request. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class CancellationSource { public: // construction :target:`CancellationSource`(); :target:`CancellationSource`(CancellationSource&&); :target:`CancellationSource`(const CancellationSource&); // methods CancellationSource& :target:`operator=`(CancellationSource&&); CancellationSource& :target:`operator=`(const CancellationSource&); :ref:`CancellationToken` :target:`token`() const; bool :ref:`cancel`(); bool :target:`isCancellationRequested`() const; }; .. _details-class_e_e_1_1_cancellation_source: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Producer side of a cancellation request. Move-only. Destroying the source does not cancel its tokens. Methods ------- .. index:: pair: function; cancel .. _doxid-class_e_e_1_1_cancellation_source_1a83ff4c1999bf4a9cc0dd2d93b899c11f: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool cancel() Requests cancellation and runs every registered callback on this thread. .. rubric:: Returns: True only for the call that performed the cancellation.