Somewhat unrelated, but I don't think the counter update is thread-safe, so `_start_all_threads` could potentially wait forever.