|
Aria 2.0.0
C++23 MVVM framework (C++20 minimum) — reactive, coroutine-first, ABI-layered
|
#include <cancellation.hpp>
Public Member Functions | |
| CancellationToken ()=default | |
| CancellationToken (std::shared_ptr< detail::CancellationState > s) | |
| bool | is_cancelled () const noexcept |
| void | throw_if_cancelled () const |
| Throw OperationCancelled if cancelled. Call at safe await points. | |
| void | on_cancel (std::function< void()> cb) |
| Register a callback fired (synchronously) when source is cancelled. | |
Static Public Member Functions | |
| static CancellationToken | none () noexcept |
| Always-cancellable empty token (useful as a default). | |
|
default |
|
inlineexplicit |
|
inlinenodiscardnoexcept |
|
inline |
Throw OperationCancelled if cancelled. Call at safe await points.
|
inline |
Register a callback fired (synchronously) when source is cancelled.
If already cancelled, invoked immediately.
|
inlinestaticnodiscardnoexcept |
Always-cancellable empty token (useful as a default).