Fixes Issue23812: asyncio.Queue task cancellation leads to item being lost by gjcarneiro · Pull Request #256 · python/asyncio (original) (raw)

Skip to content

Sign in

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

Sign in

Sign up

Appearance settings

This repository was archived by the owner on Nov 23, 2017. It is now read-only.

python / asyncio Public archive

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 }})

gjcarneiro

Copy link

@gjcarneiro gjcarneiro commented

Jul 15, 2015

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

@1st1

Copy link

Member

1st1 commented

Aug 3, 2015

@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

August 5, 2015 17:14

[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

  1. only puts item back in the queue if waiter.done() is true
  2. add comment explaining cancellation
  3. Add a missing self._consume_done_getters() call") `

[8212ccf](/python/asyncio/pull/256/commits/8212ccfe8fc26d3b93917091a7f2731f522f822f)

  1. only puts item back in the queue if waiter.done() is true
  2. add comment explaining cancellation
  3. Add a missing self._consume_done_getters() call

@gjcarneiro

Copy link

Author

gjcarneiro commented

Aug 5, 2015

@1st1 thanks for the review! The new commit should address those issues. Cheers.

@1st1

Copy link

Member

1st1 commented

Aug 5, 2015

@gjcarneiro Thanks, Gustavo! LGTM.

@gvanrossum @Haypo I'm going to commit Gustavo's patch soon, unless you guys want to review it too.

@gvanrossum

Copy link

Member

gvanrossum commented

Aug 5, 2015

via email

I don't feel the need to review.

1st1 added a commit that referenced this pull request

Aug 5, 2015

@1st1

`[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.

@1st1

Copy link

Member

1st1 commented

Aug 5, 2015

Merged. Thanks, @gjcarneiro.

@1st1 1st1 closed this

Aug 5, 2015

@gjcarneiro gjcarneiro deleted the issue23812 branch

August 5, 2015 17:50

@obmarg obmarg mentioned this pull request

Sep 25, 2015

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

@gjcarneiro @1st1 @gvanrossum