From d4017b28480f84f5979850e88b14b04d94d6e0d0 Mon Sep 17 00:00:00 2001 From: Ido Michael Date: Thu, 26 Sep 2019 15:33:20 +0300 Subject: [PATCH 1/4] Added a new method doc to Lock().locked() --- Doc/library/threading.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index 0489421cdf60e5..d71752e49e0ca7 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -496,6 +496,12 @@ All methods are executed atomically. There is no return value. + .. method:: locked() + + Check if a lock is locked. Returns a boolean to indicate the lock status. + + When the lock is acquired, returns true. If the lock is free returns false. + .. _rlock-objects: From 87cd99eaf5725e5ac69b5b035da2365c745708cf Mon Sep 17 00:00:00 2001 From: idomic Date: Fri, 27 Sep 2019 18:24:41 +0300 Subject: [PATCH 2/4] Update Doc/library/threading.rst MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Accepted comments Co-Authored-By: Rémi Lapeyre --- Doc/library/threading.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index d71752e49e0ca7..8eccd253137b17 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -500,7 +500,7 @@ All methods are executed atomically. Check if a lock is locked. Returns a boolean to indicate the lock status. - When the lock is acquired, returns true. If the lock is free returns false. + Return ``True`` when the lock is locked, ``False`` otherwise. .. _rlock-objects: From dbfbf80bc580f0a8423c5081aa3fb491c51e8c7f Mon Sep 17 00:00:00 2001 From: Ido Michael Date: Sat, 28 Sep 2019 11:45:40 +0300 Subject: [PATCH 3/4] Fixed documentation --- Doc/library/threading.rst | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index d71752e49e0ca7..cc77c58f2a983a 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -498,9 +498,7 @@ All methods are executed atomically. .. method:: locked() - Check if a lock is locked. Returns a boolean to indicate the lock status. - - When the lock is acquired, returns true. If the lock is free returns false. + Return true if the lock is acquired. .. _rlock-objects: From 64c4c59c4d27c86fd3630a2ea49ae40ef2a39398 Mon Sep 17 00:00:00 2001 From: Ido Michael Date: Tue, 1 Oct 2019 15:49:54 +0300 Subject: [PATCH 4/4] Fixed merge error --- Doc/library/threading.rst | 6 ------ 1 file changed, 6 deletions(-) diff --git a/Doc/library/threading.rst b/Doc/library/threading.rst index 3b838c2981af2a..cea110e38756a5 100644 --- a/Doc/library/threading.rst +++ b/Doc/library/threading.rst @@ -497,14 +497,8 @@ All methods are executed atomically. There is no return value. .. method:: locked() - -<<<<<<< HEAD Return true if the lock is acquired. -======= - Check if a lock is locked. Returns a boolean to indicate the lock status. - Return ``True`` when the lock is locked, ``False`` otherwise. ->>>>>>> 87cd99eaf5725e5ac69b5b035da2365c745708cf .. _rlock-objects: