summaryrefslogtreecommitdiffstats
path: root/Lib/asyncio/queues.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/asyncio/queues.py')
-rw-r--r--Lib/asyncio/queues.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/asyncio/queues.py b/Lib/asyncio/queues.py
index 2d38972..1c66d67 100644
--- a/Lib/asyncio/queues.py
+++ b/Lib/asyncio/queues.py
@@ -167,6 +167,12 @@ class Queue:
yield from getter
except:
getter.cancel() # Just in case getter is not done yet.
+
+ try:
+ self._getters.remove(getter)
+ except ValueError:
+ pass
+
if not self.empty() and not getter.cancelled():
# We were woken up by put_nowait(), but can't take
# the call. Wake up the next in line.