The count goes down whenever a consumer callstask_done() to indicate that the item was retrieved and all work onit is complete. When the count of unfinished tasks drops to zero,join() unblocks. If a join() is currently blocking, it will resume when allitems have been processed (meaning that a task_done() call wasreceived for every item that …
Continuar a ler “A Guide to Python Multiprocessing and Parallel Programming”
