Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(#198): limit tokio threads to 4 (+ main) #202

Merged
merged 1 commit into from
Oct 4, 2024
Merged

Conversation

grantlemons
Copy link
Collaborator

Tokio has two different types of threads:

  • Worker threads: for async things
  • Blocking threads: main and spawn_blocking

I limited the number of worker threads to 4, but the actual number of threads should hover around 5.
I'm not certain whether we spawn any blocking threads other than main, but if we do it should be minimal.

@grantlemons grantlemons self-assigned this Oct 4, 2024
@grantlemons grantlemons added bug Something isn't working harper-ls labels Oct 4, 2024
@elijah-potter
Copy link
Collaborator

Looks good to me. Unless tower-lsp spawns any blocking threads, there isn't anywhere where we do.

@elijah-potter elijah-potter merged commit 5be31ca into master Oct 4, 2024
7 checks passed
@elijah-potter elijah-potter deleted the thread-cap branch October 4, 2024 21:07
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working harper-ls
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants