Entropic 2.14.3
Local-first agentic inference engine
Loading...
Searching...
No Matches
entropic::RunSessionScope Class Reference

RAII publication of one run's session key to its own thread. More...

#include <entropic/types/run_scope.h>

Public Member Functions

 RunSessionScope (std::string key)
 Publish key as this thread's run session key.
 
 ~RunSessionScope ()
 Restore the previously published key.
 
 RunSessionScope (const RunSessionScope &)=delete
 
RunSessionScope & operator= (const RunSessionScope &)=delete
 

Detailed Description

RAII publication of one run's session key to its own thread.

Restores the previous value on destruction rather than clearing it, so a nested scope cannot orphan an outer turn's key.

Returns
An RAII guard binding this thread to key until it goes out of scope. @req REQ-LOOP-009
Version
2.13.0

Definition at line 158 of file run_scope.h.

Constructor & Destructor Documentation

◆ RunSessionScope()

entropic::RunSessionScope::RunSessionScope ( std::string  key)
explicit

Publish key as this thread's run session key.

gh#166 RAII enter — see header.

Parameters
keySession key ("" = the default session).
Returns
n/a (constructor). @req REQ-LOOP-009
Version
2.13.0
Parameters
keySession key to publish.
Returns
n/a (constructor). @req REQ-LOOP-009
Version
2.13.0

Definition at line 104 of file run_scope.cpp.

◆ ~RunSessionScope()

entropic::RunSessionScope::~RunSessionScope ( )

Restore the previously published key.

gh#166 RAII exit — see header.

Returns
n/a (destructor). @req REQ-LOOP-009
Version
2.13.0

Definition at line 115 of file run_scope.cpp.


The documentation for this class was generated from the following files: