Skip to content

Commit 754b9f2

Browse files
gh-149740: Remove redundant self.empty() check in asyncio.Queue.get() (#149741)
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
1 parent 1051384 commit 754b9f2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/asyncio/queues.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ async def get(self):
178178
or if the queue has been shut down immediately.
179179
"""
180180
while self.empty():
181-
if self._is_shutdown and self.empty():
181+
if self._is_shutdown:
182182
raise QueueShutDown
183183
getter = self._get_loop().create_future()
184184
self._getters.append(getter)

0 commit comments

Comments
 (0)