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 yselivanov
Recipients aeros, asvetlov, yselivanov
Date 2020-11-17.23:40:08
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605656408.88.0.701899233159.issue42392@roundup.psfhosted.org>
In-reply-to
Content
Oh my.  FWIW I think that we need to implement this differently. I don't think it matters where, say, an asyncio.Lock was instantiated. It can be created anywhere. So IMO its __init__ shouldn't try to capture the current loop -- there's no need for that. The loop can be and should be captured when the first `await lock.acquire()` is called.

I'm writing a piece of code right now that would need to jump through the hoops to simply create a new `asyncio.Lock()` in a place where there's no asyncio loop yet.
History
Date User Action Args
2020-11-17 23:40:09yselivanovsetrecipients: + yselivanov, asvetlov, aeros
2020-11-17 23:40:08yselivanovsetmessageid: <1605656408.88.0.701899233159.issue42392@roundup.psfhosted.org>
2020-11-17 23:40:08yselivanovlinkissue42392 messages
2020-11-17 23:40:08yselivanovcreate