File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -561,12 +561,14 @@ producer-consumer situation with unlimited buffer capacity::
561561 # Produce one item
562562 with cv:
563563 make_an_item_available()
564+ cv.notify()
564565
565566The ``while `` loop checking for the application's condition is necessary
566567because :meth: `~Condition.wait ` can return after an arbitrary long time,
567- and other threads may have exhausted the available items in between. This
568- is inherent to multi-threaded programming. The :meth: `~Condition.wait_for `
569- method can be used to automate the condition checking::
568+ and the condition which prompted the :meth: `~Condition.notify ` call may
569+ no longer hold true. This is inherent to multi-threaded programming. The
570+ :meth: `~Condition.wait_for ` method can be used to automate the condition
571+ checking, and eases the computation of timeouts::
570572
571573 # Consume an item
572574 with cv:
You can’t perform that action at this time.
0 commit comments