refactor(merge): extract adaptive worker spawn logic #28

Merged
coissac merged 1 commits from push-yzruqtyqvopm into main 2026-06-13 12:56:34 +00:00

1 Commits

Author SHA1 Message Date
Eric Coissac c4071eb450 refactor(merge): extract adaptive worker spawn logic
Centralize inline spawn checks into a `should_spawn_worker` function with adaptive thresholds. The first worker spawns at <95% CPU efficiency, while subsequent workers only trigger if marginal efficiency gain exceeds 25% of the expected `1/n_workers` (minimum 3%). Also increases the spawn poll interval from 10s to 20s.
2026-06-13 14:56:01 +02:00