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

Handle futures that panic on a threadpool #216

Merged
merged 1 commit into from
Mar 13, 2018

Conversation

carllerche
Copy link
Member

If a future panics from within the context of a thread pool, the pool
should not be impacted. To do this, polling the future is wrapped with a
catch_unwind. Extra care is taken to ensure that thread::panicking()
is set from within the future's drop handle.

Fixes #209

If a future panics from within the context of a thread pool, the pool
should not be impacted. To do this, polling the future is wrapped with a
catch_unwind. Extra care is taken to ensure that `thread::panicking()`
is set from within the future's drop handle.

Fixes tokio-rs#209
@carllerche carllerche merged commit 96a5424 into tokio-rs:master Mar 13, 2018
@carllerche carllerche deleted the threadpool-handle-panic branch March 29, 2018 21:30
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