diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-10-10 16:25:14 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-10 16:25:14 (GMT) |
commit | 164dddf5f8c9c6b93f32c9f79b4301fc804576e9 (patch) | |
tree | 28d12e55896c5d219388fcf68cdd1dbeab82b772 /Lib/asyncio/locks.py | |
parent | 3c270130774fa4d19fd5c2728b9309625da40b87 (diff) | |
download | cpython-164dddf5f8c9c6b93f32c9f79b4301fc804576e9.zip cpython-164dddf5f8c9c6b93f32c9f79b4301fc804576e9.tar.gz cpython-164dddf5f8c9c6b93f32c9f79b4301fc804576e9.tar.bz2 |
bpo-45416: Fix use of asyncio.Condition() with explicit Lock objects (GH-28850)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
(cherry picked from commit 1a7892414e654aa5c99efa31db767baba7f4a424)
Co-authored-by: Joongi Kim <joongi@lablup.com>
Diffstat (limited to 'Lib/asyncio/locks.py')
-rw-r--r-- | Lib/asyncio/locks.py | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/Lib/asyncio/locks.py b/Lib/asyncio/locks.py index a7453fb..4fef64e 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. |