mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-12-04 23:45:17 +01:00
2e967bf343
worker_pool takes how long its threads look out for the next job before they sleep (spin_time, 50 us, by default). The pool of the vulkan renderer gets zero: it has one job a frame, which comes milliseconds after the last, so looking out for it never caught one and only kept up to cores - 3 threads spinning beside the simulation's pool in every frame. Its threads now go to sleep at once, as they did before the pool looked out for jobs, and are woken by the job as before. The simulation's pool, whose jobs of a frame come close after one another, keeps its 50 us in every mode. A unit test runs back-to-back jobs and jobs that need a woken thread on a pool with zero look-out time.