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

Take steps to avoid threadpool starvation #11275

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Erarndt
Copy link

@Erarndt Erarndt commented Jan 13, 2025

Fixes #

Context

There are a handful of areas where threadpool threads are unnecessarily blocked by synchronous work, or there is additional contention that can be avoided. The most egregious instance is the synchronous read in BuferedReadStream

image

The outer call to BeginRead() ends up calling BufferedReadStream.Read() which synchronously blocks when _innerStream.Read() is called. This results in a substantial amount of block time for threadpool threads.

Changes Made

Testing

Notes

@JanKrivanek
Copy link
Member

Related to #11160

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.

2 participants