Writable counterpart to stop_token. std::stop_source analog.
Use to issue cooperative stop requests on a thread without holding the owning Thread wrapper. Pair with stop_token for read-only observers; together they mirror std::stop_source / std::stop_token from C++20.
Default-constructed is empty — equivalent to std::stop_source(std::nostopstate). Bind to a thread either via Thread::get_stop_source or by explicit construction from an ove_thread_t handle (advanced use).
RAII wrapper around an oveRTOS thread (task).
Definition thread.hpp:343
Writable counterpart to stop_token. std::stop_source analog.
Definition thread.hpp:128
bool request_stop() noexcept
Set the stop flag on the associated thread.
Definition thread.hpp:144
Lifetime: the underlying stop state lives in the kernel thread's TCB. A stop_source remains usable until that thread terminates; use after that is undefined (matches std::stop_source after the associated state is destroyed).
Trivially copyable; pass by value freely. Distinct from std::stop_source in that there is no shared reference count — the kernel owns the single stop slot per thread.