aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/asyncio/locks.py
diff options
context:
space:
mode:
authorJoongi Kim <joongi@lablup.com>2021-10-11 01:01:41 +0900
committerGitHub <noreply@github.com>2021-10-10 19:01:41 +0300
commit1a7892414e654aa5c99efa31db767baba7f4a424 (patch)
tree50de7bd25b262b2fe44f1028bd8da17dcb9d03c6 /Lib/asyncio/locks.py
parent62a667784ba7b84611ebd50fa8a1a464cde32235 (diff)
downloadcpython-1a7892414e654aa5c99efa31db767baba7f4a424.tar.gz
cpython-1a7892414e654aa5c99efa31db767baba7f4a424.zip
bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Diffstat (limited to 'Lib/asyncio/locks.py')
-rw-r--r--Lib/asyncio/locks.py2
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/asyncio/locks.py b/Lib/asyncio/locks.py
index a7453fb1c77..4fef64e3921 100644
--- a/Lib/asyncio/locks.py
+++ b/Lib/asyncio/locks.py
@@ -230,8 +230,6 @@ class Condition(_ContextManagerMixin, mixins._LoopBoundMixin):
super().__init__(loop=loop)
if lock is None:
lock = Lock()
- elif lock._loop is not self._get_loop():
- raise ValueError("loop argument must agree with lock")
self._lock = lock
# Export the lock's locked(), acquire() and release() methods.