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

rt: reduce the impact of CPU bound tasks on the overall runtime shceduler #6251

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tokio/src/runtime/scheduler/multi_thread/worker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,13 @@ impl Core {
.shared
.idle
.unpark_worker_by_id(&worker.handle.shared, worker.index);

// Since this worker is awakened with tasks, it cannot be responsible for
// polling the driver for a certain period of time.
// Therefore, we ensure that at least one worker is designated to poll the driver here.
// This is for avoid significant delays in driver event processing,
// as discussed in https://github.com/tokio-rs/tokio/issues/4730.
worker.handle.notify_parked_local();
return true;
}

Expand Down
Loading