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

runtime: add custom keep_alive functionality #2809

Merged

Conversation

blasrodri
Copy link
Contributor

@blasrodri blasrodri commented Sep 2, 2020

Adds a keep_alive attribute in the builder that can be
customized only for the BlockingPool

Fixes: #2585

Adds a keep_alive attribute in the builder that can be
customized only for the BlockingPool

Fixes: tokio-rs#2585
@blasrodri
Copy link
Contributor Author

This PR needs a test. Lacking good ideas on how to do so. Open to suggestions :)

@Darksonn Darksonn added A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-runtime Module: tokio/runtime labels Sep 2, 2020
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! This looks like a good start. I had some small suggestions.

tokio/src/runtime/builder.rs Outdated Show resolved Hide resolved
tokio/src/runtime/builder.rs Outdated Show resolved Hide resolved
tokio/src/runtime/builder.rs Outdated Show resolved Hide resolved
@blasrodri blasrodri requested a review from hawkw September 2, 2020 19:51
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

Some more docs nits. Other than that, this looks good to me, and I'll be happy to merge it once the docs issues are addressed.

tokio/src/runtime/builder.rs Outdated Show resolved Hide resolved
tokio/src/runtime/builder.rs Outdated Show resolved Hide resolved
tokio/src/runtime/builder.rs Outdated Show resolved Hide resolved
Copy link
Member

@hawkw hawkw left a comment

Choose a reason for hiding this comment

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

Okay, this looks good to me — sorry for the back and forth on feature flags. Thanks for working on this!

@blasrodri
Copy link
Contributor Author

Thanks for the review @hawkw

@Darksonn Darksonn merged commit f4d6ed0 into tokio-rs:master Sep 7, 2020
@blasrodri blasrodri deleted the blocking-thread-timeout-configurable branch September 7, 2020 20:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-tokio Area: The main tokio crate C-enhancement Category: A PR with an enhancement or bugfix. M-runtime Module: tokio/runtime
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make blocking thread timeout configurable
4 participants