Skip to main content

WorkerTable

Type Alias WorkerTable 

Source
pub type WorkerTable = Arc<Mutex<HashMap<String, Arc<WorkerHandle>>>>;
Expand description

A process-wide table of live background workers keyed by worker_id. Shared between the agent tool (which inserts) and the send_message tool ( which looks up to continue a worker).

The lock is a synchronous std::sync::Mutex (not tokio’s RwLock) so a Drop guard can remove an entry without awaiting — the task_stop abort path unwinds the worker task and must deregister synchronously (goal-379). Critical sections are microsecond-scale (HashMap insert/get/remove).

Aliased Type§

pub struct WorkerTable { /* private fields */ }