|
Thread System 0.3.1
High-performance C++20 thread pool with work stealing and DAG scheduling
|
Thread-local cancellation context for implicit token propagation. More...
#include <enhanced_cancellation_token.h>

Classes | |
| class | guard |
| RAII guard for push/pop operations. More... | |
Static Public Member Functions | |
| static auto | current () -> enhanced_cancellation_token |
| Gets the current thread's cancellation token. | |
| static auto | push (enhanced_cancellation_token token) -> void |
| Pushes a token to the thread-local stack. | |
| static auto | pop () -> void |
| Pops a token from the thread-local stack. | |
Private Member Functions | |
| cancellation_context ()=delete | |
Thread-local cancellation context for implicit token propagation.
Provides a way to implicitly propagate cancellation tokens through the call stack using thread-local storage.
Definition at line 489 of file enhanced_cancellation_token.h.
|
privatedelete |
|
staticnodiscard |
Gets the current thread's cancellation token.
Definition at line 606 of file enhanced_cancellation_token.cpp.
References kcenon::thread::enhanced_cancellation_token::create().

|
static |
Pops a token from the thread-local stack.
Definition at line 620 of file enhanced_cancellation_token.cpp.
Referenced by kcenon::thread::cancellation_context::guard::~guard().

|
static |
Pushes a token to the thread-local stack.
| token | The token to push. |
Definition at line 615 of file enhanced_cancellation_token.cpp.
Referenced by kcenon::thread::cancellation_context::guard::guard().
