MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / start_threads

Function start_threads

example_code/item_070.py:326–330  ·  view source on GitHub ↗
(count, *args)

Source from the content-addressed store, hash-verified

324
325print("Example 23")
326def start_threads(count, *args):
327 threads = [StoppableWorker(*args) for _ in range(count)]
328 for thread in threads:
329 thread.start()
330 return threads
331
332def drain_queue(input_queue):
333 input_queue.shutdown()

Callers 1

item_070.pyFile · 0.85

Calls 1

StoppableWorkerClass · 0.70

Tested by

no test coverage detected