-
-
Notifications
You must be signed in to change notification settings - Fork 32.6k
Closed
Closed
Copy link
Labels
Description
Documentation
The wording of asyncio.Event.clear is not consistent with threading.Event.clear. The difference can cause programmers to suspect a difference in behavior, which is not the case. The threading.Event wording makes it clear that threads will block on subsequent calls to Event.wait() if the flag is cleared. With the asyncio.Event wording this is less clear, possibly leading programmers to expect a sufficiently quick call to Event.set() will result in some tasks failing to proceed through an await event.wait() expression.
This issue was raised by a question on StackOverflow. I don't see a rationale for the difference in wording.
Linked PRs
Metadata
Metadata
Assignees
Labels
Projects
Status
Done