-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Closed
Labels
A-tokioArea: The main tokio crateArea: The main tokio crateC-bugCategory: This is a bug.Category: This is a bug.M-taskModule: tokio/taskModule: tokio/task
Description
Version
Tokio 1.21.2
Platform
Linux 5.15.0-53-generic #59-Ubuntu SMP Mon Oct 17 18:53:30 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Description
The MAX_TICKS_PER_TASK parameter in LocalSet is hardcoded to be 61.
This means that if, while a task is waiting for IO, there is a task in a LocalSet that is performing
loop {
expensive_computation();
tokio::task::yield_now().await;
}
The expensive_computation will run up to 61 times before IO is polled, which will cause high tail latencies.
cc @carllerche
Metadata
Metadata
Assignees
Labels
A-tokioArea: The main tokio crateArea: The main tokio crateC-bugCategory: This is a bug.Category: This is a bug.M-taskModule: tokio/taskModule: tokio/task