Class: RobotLab::A2A::Registry
- Inherits:
-
Object
- Object
- RobotLab::A2A::Registry
- Defined in:
- lib/robot_lab/a2a/registry.rb
Overview
Tracks live robot threads for in-progress interactive runs. Keyed by A2A task_id. Entries are removed when the robot thread finishes.
Defined Under Namespace
Classes: Entry
Class Method Summary collapse
- .clear ⇒ Object
- .delete(task_id) ⇒ Object
- .fetch(task_id) ⇒ Object
- .register(task_id, entry) ⇒ Object
- .size ⇒ Object
Class Method Details
.clear ⇒ Object
30 31 32 |
# File 'lib/robot_lab/a2a/registry.rb', line 30 def clear @mutex.synchronize { @entries.clear } end |
.delete(task_id) ⇒ Object
22 23 24 |
# File 'lib/robot_lab/a2a/registry.rb', line 22 def delete(task_id) @mutex.synchronize { @entries.delete(task_id) } end |
.fetch(task_id) ⇒ Object
18 19 20 |
# File 'lib/robot_lab/a2a/registry.rb', line 18 def fetch(task_id) @mutex.synchronize { @entries[task_id] } end |
.register(task_id, entry) ⇒ Object
14 15 16 |
# File 'lib/robot_lab/a2a/registry.rb', line 14 def register(task_id, entry) @mutex.synchronize { @entries[task_id] = entry } end |
.size ⇒ Object
26 27 28 |
# File 'lib/robot_lab/a2a/registry.rb', line 26 def size @mutex.synchronize { @entries.size } end |