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

Introduce configuration options to control core and max threads #1977

Merged
merged 6 commits into from
Dec 18, 2019

Conversation

DoumanAsh
Copy link
Contributor

@DoumanAsh DoumanAsh commented Dec 17, 2019

Motivation

User might want to configure cap on blocking pool

Solution

Add option to runtime and propagate it to blocking pool, upon creating it.

Changes to configuration:

  • Max thread num - specifies limit on threads, spawned by runtime
  • Core thread num - number of active threads, always in use by runtime.

Blocking threads will be max - core

@DoumanAsh DoumanAsh changed the title Introduce configuration option for blocking thread pool Introduce configuration options to control core and max threads Dec 18, 2019
Copy link
Member

@carllerche carllerche left a comment

Choose a reason for hiding this comment

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

Looks great, thanks 👍

@carllerche carllerche merged commit b24ad9f into tokio-rs:master Dec 18, 2019
@DoumanAsh DoumanAsh deleted the blocking_opt branch December 18, 2019 18:37
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.

None yet

2 participants