|
Entropic 2.14.3
Local-first agentic inference engine
|
RAII: publish a streaming run's sink to its own thread (gh#208). More...
#include <entropic/types/run_scope.h>
Public Member Functions | |
| RunStreamScope (RunStreamFn fn, void *user_data) | |
| Publish (fn, user_data) as this thread's stream sink. | |
| ~RunStreamScope () | |
| Restore the previously published sink. | |
| RunStreamScope (const RunStreamScope &)=delete | |
| RunStreamScope & | operator= (const RunStreamScope &)=delete |
RAII: publish a streaming run's sink to its own thread (gh#208).
Generation runs inline on the run's thread — the property gh#158's per-run cancel token already relies on — so every chunk the run emits reaches this sink and no other run's. Restores the previous sink on destruction, so a nested streaming scope cannot orphan an outer one.
Definition at line 217 of file run_scope.h.
| entropic::RunStreamScope::RunStreamScope | ( | RunStreamFn | fn, |
| void * | user_data | ||
| ) |
Publish (fn, user_data) as this thread's stream sink.
Publish a streaming run's sink to this thread (gh#208).
| fn | Sink; nullptr installs "no sink". |
| user_data | Forwarded to fn. |
| fn | Sink. |
| user_data | Forwarded to fn. @req REQ-LOOP-008 |
Definition at line 150 of file run_scope.cpp.
| entropic::RunStreamScope::~RunStreamScope | ( | ) |
Restore the previously published sink.
Restore the previous sink (gh#208).
@req REQ-LOOP-008
Definition at line 161 of file run_scope.cpp.