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

Clean up the pending task #697

Merged
merged 3 commits into from
Sep 28, 2021

Conversation

shingo78
Copy link
Contributor

Fix #696

Copy link
Member

@davidbrochart davidbrochart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, that looks good. It would be great to add a test.

Comment on lines 24 to 26
except KeyboardInterrupt:
future.cancel()
raise
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we want to handle any kind of exception?

Suggested change
except KeyboardInterrupt:
future.cancel()
raise
except BaseException as e:
future.cancel()
raise e

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with your suggestion.

@davidbrochart
Copy link
Member

Great, do you feel like adding a test?

@shingo78
Copy link
Contributor Author

Yes, I would like to add a test.

@shingo78
Copy link
Contributor Author

Please review the test I pushed.

@davidbrochart
Copy link
Member

Thanks @shingo78, that looks great.

@blink1073 blink1073 added the bug label Sep 28, 2021
@blink1073 blink1073 added this to the 7.0 milestone Sep 28, 2021
@blink1073 blink1073 merged commit 5b57015 into jupyter:master Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

run_sync does not clean up the pending task after run_until_complete is interrupted
3 participants