-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Closed
Labels
Description
Documentation
In the asyncio.Queue source, under the Queue class declaration, it claims that asyncio.queues.qsize is reliable, unlike queue.Queue.qsize, since the size of the queue wouldn't change while getting the size of the queue in single-threaded asyncio usage. This is correct, but the docstring calls queue.Queue the "standard library Queue" here:
Unlike the standard library Queue, you can reliably know this Queue's size
with qsize(), since your single-threaded asyncio application won't be
interrupted between calling qsize() and doing an operation on the Queue.
This is ambiguous, since asyncio.Queue is technically also part of the standard library. My PR changes it to:
Unlike the thread-safe queue.Queue, you can reliably know this Queue's size
...
This problem is not present in the python docs page, which calls it the 'standard library threading queue' with a hyperlink reference to the queue module.
Linked PRs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Projects
Status
Done
Status
Todo