File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -586,7 +586,13 @@ The :mod:`functools` module defines the following functions:
586
586
task_queue.put(node)
587
587
588
588
# When the work for a node is done, workers put the node in
589
- # 'finalized_tasks_queue' so we can get more nodes to work on
589
+ # 'finalized_tasks_queue' so we can get more nodes to work on.
590
+ # The definition of 'is_active()` guarantees that, at this point, at
591
+ # least one node has been placed on 'task_queue' that hasn't yet
592
+ # been passed to `done()`, so this blocking `get()` must (eventually)
593
+ # succeed. After calling `done()`, we loop back to call `get_ready()`
594
+ # again, so put newly freed nodes on 'task_queue' as soon as
595
+ # logically possible.
590
596
node = finalized_tasks_queue.get()
591
597
592
598
topological_sorter.done(node)
You can’t perform that action at this time.
0 commit comments