| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
Co-authored-by: Guido van Rossum <guido@python.org>
|
I hope sumeone will review this. Right now I am not available as a reviewer, sorry. |
Sorry, something went wrong.
There was a problem hiding this comment.
Two bits of idiom noted below, but overall this looks great to me - thanks, @nineteendo!
Sorry, something went wrong.
Co-authored-by: Zac Hatfield-Dodds <zac.hatfield.dodds@gmail.com>
Co-authored-by: Kumar Aditya <kumaraditya@python.org>
There was a problem hiding this comment.
Hi @nineteendo, Thanks for the PR. I left a comment on the doc and will take a closer look at the implementation after I hear back about the expected behavior.
Sorry, something went wrong.
|
Hi @nineteendo @Zac-HD @kumaraditya303 @itamaro @ambv, @carljm, I've noticed a recent trend that the ayncio PR titles and body text are often very terse without much context on what the change is and why. To help reviewers and to give context to future contributors, let's raise the bar a bit on how we document asyncio PRs.
Two sentences (one with purpose: why; one with change: what) would be very helpful for reviewers for both individual and stacked task PRs. It would likely also help us turn around PRs in a more timely manner. Thanks! |
Sorry, something went wrong.
|
I've adjusted the PR title and body text. I hope it's a bit clearer now. The example is based on the current one in the documentation. |
Sorry, something went wrong.
|
I want to think some more about what would be the best approach to support this for both synchronous and asynchronous queues. |
Sorry, something went wrong.
|
I finished the alternative pull request: #120925. Decide if you prefer it over the current pull request. |
Sorry, something went wrong.
|
@nineteendo Please refrain from opening multiple pull requests at one time for the same issue. Instead, iterating on one PR toward a preferred solution. Here is the preferred approach:
Thanks! |
Sorry, something went wrong.
|
Sorry for the trouble, the original issue technically didn't apply to syncronous queues (as per the title). |
Sorry, something went wrong.
|
Marking this as closed for the reasons listed in #120925 Thanks for the work on this. It was a plausible idea but queues are more versatile than the iterator protocol allows. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Purpose
Currently consuming items from a queue is very complex. You need to
By making asyncio.Queue an asynchronous iterable, this becomes a lot easier, you only need to call queue.shutdown().
Overview of changes
Example
Without iteration
With iteration
Output
📚 Documentation preview 📚: library/asyncio-queue.html