Skip to content

Commit 1cd8571

Browse files
committed
Refine the docstring of wait to clarify that False will be returned in the case of a timeout
1 parent 81e3e82 commit 1cd8571

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Doc/library/threading.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -989,12 +989,12 @@ method. The :meth:`~Event.wait` method blocks until the flag is true.
989989

990990
When the timeout argument is present and not ``None``, it should be a
991991
floating point number specifying a timeout for the operation in seconds
992-
(or fractions thereof). When the timeout occurs, ``False`` will be returned.
992+
(or fractions thereof).
993993

994994
This method returns ``True`` if and only if the internal flag has been set to
995995
true, either before the wait call or after the wait starts, so it will
996996
always return ``True`` except if a timeout is given and the operation
997-
times out.
997+
times out. If such a timeout occurs, ``False`` will be returned.
998998

999999
.. versionchanged:: 3.1
10001000
Previously, the method always returned ``None``.

0 commit comments

Comments
 (0)