def test_stop_stops_all_workers(pool: ThreadPool): pool.stop() for w in pool.workers: w.join()
def pool(): p = ThreadPool(num_workers=4) yield p p.stop()