Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Lib/asyncio/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,9 @@ async def put(self, item):
# previous get_nowait call.
pass
if not self.full() and not putter.cancelled():
# We were woken up by get_nowait(), but can't take
# the call. Wake up the next in line.
# We were woken up by get_nowait(), but can't take the
# call. Wake up the next in line. This can happen when
# the putter is set, then the await cancelled.
self._wakeup_next(self._putters)
raise
return self.put_nowait(item)
Expand Down Expand Up @@ -166,8 +167,9 @@ async def get(self):
# previous put_nowait call.
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.
# We were woken up by put_nowait(), but can't take the
# call. Wake up the next in line. This can happen when
# the getter is set, then the await cancelled.
self._wakeup_next(self._getters)
raise
return self.get_nowait()
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improve comments in asyncio.queues.Queue.