← 输入框|bugs.python.org|刷新

➜

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.

作者 asvetlov
收信人 aeros, asvetlov, yselivanov
日期 2020-11-18.19:34:20
SpamBayes Score -1.0
Marked as misclassified 是
Message-id <1605728061.49.0.479855543389.issue42392@roundup.psfhosted.org>
In-reply-to
内容
Despite the fact that asyncio.get_running_loop() never returns None but raises RuntimeError (and maybe other tiny cleanups), 
I can live with the proposal.

It doesn't make a system worse at least and backward compatible.
We can return to the idea of raising a warning from the constructor later, on collecting more feedback.

P.S.
There is a subtle non-deterministic behavior in the proposal: if the lock is accessed from a concurrent thread, the exception about wrong usage will be raised later at an arbitrary code point.
This is a well-known problem of the lazy initialization pattern and maybe we should do nothing with it. The programming is a compromise always.
历史
日期 用户 动作 参数
2020-11-18 19:34:21asvetlov修改recipients: + asvetlov, yselivanov, aeros
2020-11-18 19:34:21asvetlov修改messageid: <1605728061.49.0.479855543389.issue42392@roundup.psfhosted.org>
2020-11-18 19:34:21asvetlov链接issue42392 messages
2020-11-18 19:34:20asvetlov创建