95 class CancellationToken;
140 void reset() noexcept;
147 [[nodiscard]]
bool valid() const noexcept;
154 std::weak_ptr<State> state_;
186 [[nodiscard]]
bool valid() const noexcept;
193 [[nodiscard]]
bool is_cancellation_requested() const noexcept;
216 void throw_if_cancellation_requested() const;
223 std::shared_ptr<State> state_;
257 [[nodiscard]]
bool is_cancellation_requested() const noexcept;
270 bool request_cancel() const;
275 std::shared_ptr<State> state_;
Move-only RAII handle that represents one subscribed cancellation callback.
Definition: cancellation.h:107
CancellationRegistration() noexcept
Constructs an empty registration that owns no callback slot.
Mutator that mints observer tokens and signals one-shot cancellation.
Definition: cancellation.h:238
CancellationToken token() const noexcept
Returns a fresh observer token bound to this source.
CancellationSource()
Constructs an uncancelled source with no subscribed callbacks.
Lightweight observer of a CancellationSource shared across worker threads.
Definition: cancellation.h:174
CancellationToken() noexcept
Constructs an invalid token not bound to any source.
Move-only type-erased callable analogue of std::move_only_function with pool spill.
Definition: functional.h:134
Pool-backed type-erased callables: copyable vlink::Function and move-only vlink::MoveFunction.
Cross-platform macros for visibility, branch hints, copy prevention, singletons and string helpers.
#define VLINK_EXPORT
Definition: macros.h:81
#define VLINK_DISALLOW_COPY_AND_ASSIGN(classname)
Deletes the copy constructor and copy-assignment operator of classname.
Definition: macros.h:174