File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -584,12 +584,14 @@ producer-consumer situation with unlimited buffer capacity::
584584 # Produce one item
585585 with cv:
586586 make_an_item_available()
587+ cv.notify()
587588
588589The ``while `` loop checking for the application's condition is necessary
589590because :meth: `~Condition.wait ` can return after an arbitrary long time,
590- and other threads may have exhausted the available items in between. This
591- is inherent to multi-threaded programming. The :meth: `~Condition.wait_for `
592- method can be used to automate the condition checking::
591+ and the condition which prompted the :meth: `~Condition.notify ` call may
592+ no longer hold true. This is inherent to multi-threaded programming. The
593+ :meth: `~Condition.wait_for ` method can be used to automate the condition
594+ checking, and eases the computation of timeouts::
593595
594596 # Consume an item
595597 with cv:
You can’t perform that action at this time.
0 commit comments