|
Entropic 2.14.3
Local-first agentic inference engine
|
RAII publication of one run's cancel token to its own thread. More...
#include <entropic/types/run_scope.h>
Public Member Functions | |
| RunCancelScope (std::atomic< bool > *token) | |
Publish token as this thread's run cancel token. | |
| ~RunCancelScope () | |
| Restore the previously installed token. | |
| RunCancelScope (const RunCancelScope &)=delete | |
| RunCancelScope & | operator= (const RunCancelScope &)=delete |
RAII publication of one run's cancel token to its own thread.
Restores the previous value on destruction rather than clearing it, so a nested scope (a child delegation loop inside a parent turn) cannot orphan the parent's token when it unwinds.
token until it goes out of scope, at which point the previous token is restored. @req REQ-LOOP-006 Definition at line 98 of file run_scope.h.
|
explicit |
Publish token as this thread's run cancel token.
gh#158 RAII enter — see header.
Non-const since gh#158's audit pass: cancel_current_run() stops the run from inside it, which is a write.
| token | Borrowed cancel flag; nullptr installs "no token". |
| token | Borrowed cancel flag; nullptr installs "no token". |
Definition at line 57 of file run_scope.cpp.
| entropic::RunCancelScope::~RunCancelScope | ( | ) |
Restore the previously installed token.
gh#158 RAII exit — see header.
Definition at line 82 of file run_scope.cpp.