You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
arielb1
changed the title
High tail latencies since MAX_TASKS_PER_TICK in LocalSet is hardcoded
yield_now not yielding since MAX_TASKS_PER_TICK in LocalSet is hardcoded
Nov 18, 2022
Previously, calling `task::yield_now().await` would yield the current
task to the scheduler, but the scheduler would poll it again before
polling the resource drivers. This behavior can result in starving the
resource drivers.
This patch creates a queue tracking yielded tasks. The scheduler
notifies those tasks **after** polling the resource drivers.
Refs: #5209
Version
Tokio 1.21.2
Platform
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
The
expensive_computation
will run up to 61 times before IO is polled, which will cause high tail latencies.cc @carllerche
The text was updated successfully, but these errors were encountered: