Skip to content

Commit

Permalink
What if we add a checkpoint?
Browse files Browse the repository at this point in the history
  • Loading branch information
njsmith committed Aug 4, 2017
1 parent 027d374 commit ae87d96
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions trio/_core/tests/test_ki.py
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,11 @@ async def main():
# PyObject_Repr, which does an unconditional
# PyErr_CheckSignals for some reason.
print(repr(None))
# And finally, it's possible that the signal was delivered
# but at a moment when we had KI protection enabled, so we
# need to execute a checkpoint to ensure it's delivered
# before we exit main().
await _core.yield_briefly()
finally:
print("joining thread", sys.exc_info())
thread.join()
Expand Down

0 comments on commit ae87d96

Please sign in to comment.