Skip to content

threading.Event.wait timeout behavior is unclear #114827

@beauxq

Description

@beauxq

Documentation

From reading the documentation on threading.Event.wait https://docs.python.org/3/library/threading.html#threading.Event.wait
I can't tell whether it returns False when it times out, or whether it raises an exception (like TimeoutError) when it times out.

I can do a quick test to find out:

>>> e = threading.Event()
>>> e.wait(1)
False

But it would be nice if I could tell from the documentation.

maybe something like this:

- and the operation times out.
+ and the operation times out, when it will return `False`.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions