Skip to content

Rock beats scissors, lizard beats spock, KeyboardInterrupt beats Cancelled#184

Merged
njsmith merged 1 commit intopython-trio:masterfrom
njsmith:keyboardinterrupt-beats-cancelled
Jun 4, 2017
Merged

Rock beats scissors, lizard beats spock, KeyboardInterrupt beats Cancelled#184
njsmith merged 1 commit intopython-trio:masterfrom
njsmith:keyboardinterrupt-beats-cancelled

Conversation

@njsmith
Copy link
Member

@njsmith njsmith commented Jun 4, 2017

If we have a pending KeyboardInterrupt and a pending Cancelled, then
deliver the KeyboardInterrupt.

Rationale: when there are nested cancel scopes, we raise the outermost
Cancelled exception. KeyboardInterrupt is the outerest cancellation.

@codecov
Copy link

codecov bot commented Jun 4, 2017

Codecov Report

Merging #184 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #184      +/-   ##
==========================================
+ Coverage   98.44%   98.44%   +<.01%     
==========================================
  Files          53       53              
  Lines        6116     6129      +13     
  Branches      476      476              
==========================================
+ Hits         6021     6034      +13     
  Misses         80       80              
  Partials       15       15
Impacted Files Coverage Δ
trio/_core/tests/test_ki.py 100% <100%> (ø) ⬆️
trio/_core/_run.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b9556a...e9d50eb. Read the comment docs.

…elled

If we have a pending KeyboardInterrupt *and* a pending Cancelled, then
deliver the KeyboardInterrupt.

Rationale: when there are nested cancel scopes, we raise the outermost
Cancelled exception. KeyboardInterrupt is the outerest cancellation.
@njsmith njsmith force-pushed the keyboardinterrupt-beats-cancelled branch from cd0f278 to e9d50eb Compare June 4, 2017 07:09
@njsmith njsmith merged commit a83229c into python-trio:master Jun 4, 2017
@njsmith njsmith deleted the keyboardinterrupt-beats-cancelled branch June 4, 2017 08:09
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.

1 participant