From c372ea495decedaaae35fc0ebd66c61f38d5e7e1 Mon Sep 17 00:00:00 2001 From: beauxq Date: Wed, 31 Jan 2024 17:12:15 -0800 Subject: [PATCH 1/2] gh-114827: clarify `threading.Event.wait` timeout behavior --- Lib/threading.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/threading.py b/Lib/threading.py index 75a08e5aac97d6..1265286f55af6a 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -647,7 +647,8 @@ def wait(self, timeout=None): (or fractions thereof). This method returns the internal flag on exit, so it will always return - True except if a timeout is given and the operation times out. + True except if a timeout is given and the operation times out, when it + will return `False`. """ with self._cond: From 8beb649ab6fa98a3c320b49ddd30ae7988e024bd Mon Sep 17 00:00:00 2001 From: beauxq Date: Thu, 1 Feb 2024 11:59:48 -0800 Subject: [PATCH 2/2] double backticks for rst, and include `True` --- Lib/threading.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lib/threading.py b/Lib/threading.py index 1265286f55af6a..1fb3633af1b5d1 100644 --- a/Lib/threading.py +++ b/Lib/threading.py @@ -647,8 +647,8 @@ def wait(self, timeout=None): (or fractions thereof). This method returns the internal flag on exit, so it will always return - True except if a timeout is given and the operation times out, when it - will return `False`. + ``True`` except if a timeout is given and the operation times out, when + it will return ``False``. """ with self._cond: