Expand description
User-facing RealtimeAsyncWorld API and shutdown state machine.
This is the primary mode for RL training: the tick engine runs on a dedicated background thread at a configurable rate (default 60 Hz), while an egress thread pool serves observation requests concurrently.
§Architecture
User Thread(s) Tick Thread Egress Workers (N)
| | |
|--submit_commands()------->| cmd_rx.try_recv() |
| [cmd_tx: bounded(64)] | engine.submit_commands()|
|<--receipts via reply_tx---| engine.execute_tick() |
| | ring.push(snap) |
| | epoch_counter.advance() |
| | check_stalled_workers() |
| | sleep(budget - elapsed) |
| | |
|--observe()-------------------------------------> |
| [obs_tx: bounded(N*4)] task_rx.recv()
| blocks on reply_rx ring.latest()
| pin epoch
| execute ObsPlan
| unpin epoch
|<--result via reply_tx-------------------------- |Structs§
- Realtime
Async World - Realtime asynchronous simulation world.
- Shutdown
Report - Report from the shutdown state machine.
Enums§
- Submit
Error - Error submitting commands to the tick thread.