Expand description
WorkerPool — manages N Bun render-pool workers.
Responsibilities:
- Spawn N workers (default =
num_cpus / 2, min 1) on a manifest. - Watchdog task: ping every 30 s; kill + respawn on missed pong.
- Rolling reload: spawn parallel new pool, drain old.
get(): returns any live worker (round-robin in P9+; index 0 in P7 since Mode 2 is stubbed and no concurrent renders flow through).
Structs§
Functions§
- rolling_
reload - Spawn a new pool from fresh manifest bytes and then drain the old pool.
The caller swaps the
Arc<WorkerPool>reference atomically before draining.