Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow multiple calls to loop.stop #60

Closed
wants to merge 2 commits into from
Closed

Conversation

tjstum
Copy link
Member

@tjstum tjstum commented Jul 10, 2019

Calling loop.stop and then immediately proceeding to exit the
open_loop's context (without hitting any checkpoints) causes the
program to hang forever

Fix by reusing the same waiter event across multiple calls to stop

Fixes #58

Calling loop.stop and then immediately proceeding to exit the
`open_loop`'s context (without hitting any checkpoints) causes the
program to hang forever

Fix by reusing the same `waiter` event across multiple calls to `stop`

Fixes python-trio#58
@tjstum
Copy link
Member Author

tjstum commented Jul 10, 2019

@smurfix I know you suggested a mention in the docs. It looked reasonable to fix, so I had a go at it. If you'd prefer just a doc fix, no worries, I can just do that!

@oremanj
Copy link
Member

oremanj commented Jul 22, 2019

Looks good. Can you add a newsfragment?

@codecov
Copy link

codecov bot commented Jul 23, 2019

Codecov Report

Merging #60 into master will increase coverage by 0.22%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master      #60      +/-   ##
==========================================
+ Coverage   73.33%   73.55%   +0.22%     
==========================================
  Files          11       11              
  Lines        1264     1267       +3     
  Branches      165      166       +1     
==========================================
+ Hits          927      932       +5     
+ Misses        282      281       -1     
+ Partials       55       54       -1
Impacted Files Coverage Δ
trio_asyncio/base.py 85.42% <100%> (+0.03%) ⬆️
trio_asyncio/async_.py 85.48% <100%> (+0.48%) ⬆️
trio_asyncio/handles.py 83.17% <0%> (+1.86%) ⬆️

@smurfix
Copy link
Collaborator

smurfix commented Jul 24, 2019

added to "next" branch

@smurfix smurfix closed this Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Manually calling loop.stop causes deadlock
3 participants