By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Replace StmMap worker status tracking with a TVar Int busy counter The allDone check materialized the entire status map into a list via ListT.toList on every idle tick for every worker. Replace the StmMap Int Bool with a single TVar Int counting busy workers, making the idle check O(1) instead of O(n) in the number of fetchers.