This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author asvetlov
Recipients asvetlov, fried, lukasz.langa, yselivanov
Date 2018-05-21.09:29:32
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1526894972.81.0.682650639539.issue33546@psf.upfronthosting.co.za>
In-reply-to
Content
No, condition variables don't work this way.
The proper code looks like:

async with cond:
    while not <condition met>:
        await cond.wait()
    <do work when the condition is satisfied>

It cannot be collapsed to just `await cond`.
History
Date User Action Args
2018-05-21 09:29:32asvetlovsetrecipients: + asvetlov, lukasz.langa, yselivanov, fried
2018-05-21 09:29:32asvetlovsetmessageid: <1526894972.81.0.682650639539.issue33546@psf.upfronthosting.co.za>
2018-05-21 09:29:32asvetlovlinkissue33546 messages
2018-05-21 09:29:32asvetlovcreate