Fixes Issue23812: asyncio.Queue task cancellation leads to item being lost by gjcarneiro · Pull Request #256 · python/asyncio (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
Explore - Why GitHub
- All features
- Documentation
- GitHub Skills
- Blog
- By company size
- Topics
- Pricing
Provide feedback
We read every piece of feedback, and take your input very seriously.
Include my email address so I can be contacted
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
This repository was archived by the owner on Nov 23, 2017. It is now read-only.
python / asyncio Public archive
Notifications You must be signed in to change notification settings
Additional navigation options
Closed
gjcarneiro wants to merge3 commits intopython:masterfromgjcarneiro:issue23812
Closed
Fixes Issue23812: asyncio.Queue task cancellation leads to item being lost #256
gjcarneiro wants to merge3 commits intopython:masterfromgjcarneiro:issue23812
Conversation5 Commits3 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
Copy link
gjcarneiro commented
asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being
lost. See http://bugs.python.org/issue23812
`[Fixes Issue23812: asyncio.Queue task cancellation leads to item being…](/python/asyncio/pull/256/commits/73a8d559a0739e9c747791f4babf5cba8ff7ceec "Fixes Issue23812: asyncio.Queue task cancellation leads to item being lost
asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost. See http://bugs.python.org/issue23812") `
[73a8d55](/python/asyncio/pull/256/commits/73a8d559a0739e9c747791f4babf5cba8ff7ceec)
… lost
asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost. See http://bugs.python.org/issue23812
Copy link
Member
1st1 commented
@gjcarneiro Hi Gustavo, thanks for the PR. I've left a few comments there, please take a look.
Overall, I like the patch, let's get this fixed finally.
Gustavo Carneiro added 2 commits
[Merge branch 'master' into issue23812](/python/asyncio/pull/256/commits/20d5df7d3bb4ba696bfdca422bf1bc60841b7c19 "Merge branch 'master' into issue23812")
[20d5df7](/python/asyncio/pull/256/commits/20d5df7d3bb4ba696bfdca422bf1bc60841b7c19)
`[Issue23812: address Yury Selivanov's comments in PR256](/python/asyncio/pull/256/commits/8212ccfe8fc26d3b93917091a7f2731f522f822f "Issue23812: address Yury Selivanov's comments in PR256
- only puts item back in the queue if waiter.done() is true
- add comment explaining cancellation
- Add a missing self._consume_done_getters() call") `
[8212ccf](/python/asyncio/pull/256/commits/8212ccfe8fc26d3b93917091a7f2731f522f822f)
- only puts item back in the queue if waiter.done() is true
- add comment explaining cancellation
- Add a missing self._consume_done_getters() call
Copy link
Author
gjcarneiro commented
@1st1 thanks for the review! The new commit should address those issues. Cheers.
Copy link
Member
1st1 commented
@gjcarneiro Thanks, Gustavo! LGTM.
@gvanrossum @Haypo I'm going to commit Gustavo's patch soon, unless you guys want to review it too.
Copy link
Member
gvanrossum commented
via email
I don't feel the need to review.
1st1 added a commit that referenced this pull request
`[Merge PR](/python/asyncio/commit/1dd213ee66e4b8fbca658652f8b1bc3958707c0b "Merge PR #256: fix issue23812 of queues loosing items on cancellation
Patch by @gjcarneiro.") #256[: fix issue23812 of queues loosing items on cancellation](/python/asyncio/commit/1dd213ee66e4b8fbca658652f8b1bc3958707c0b "Merge PR #256: fix issue23812 of queues loosing items on cancellation
Patch by @gjcarneiro.") `
[1dd213e](/python/asyncio/commit/1dd213ee66e4b8fbca658652f8b1bc3958707c0b)
Patch by @gjcarneiro.
Copy link
Member
1st1 commented
Merged. Thanks, @gjcarneiro.
1st1 closed this
gjcarneiro deleted the issue23812 branch
obmarg mentioned this pull request
Queue in python 3.5 asserts/hangs with low queue size#268
Closed
Sign up for free to subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers
No reviews
Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
3 participants