macovedj opened PR #14460 from macovedj:component-async-coop-yield to bytecodealliance:main:
Wasmtime can keep processing ready, high-priority component work without yielding to the async executor. The two tests cover ways this can happen. In the first, a batch of spawned store tasks finishes before a sibling Tokio task gets a turn to send its oneshot result. In the second, cancellation callbacks repeatedly start and cancel new subtasks, keeping the event loop busy while a timer cannot complete.
This change caps the number of event-loop work turns between yields at 128. I chose 128, inspired by Tokio’s cooperative budget, but I’m happy to consider another cap or a different approach.
macovedj requested cfallin for a review on PR #14460.
macovedj requested wasmtime-core-reviewers for a review on PR #14460.
github-actions[bot] added the label wasmtime:api on PR #14460.
:thumbs_up: cfallin submitted PR review:
The fix looks reasonable to me; maybe double-check with @dicej that this makes sense before merging?
:speech_balloon: cfallin created PR review comment:
tiny nit but caught my eye -- s/idividual/individual/ on the comment two lines above (pre-existing).
(may be the first time we actually use our "typo fixes go along with other changes" policy!)
:thumbs_up: dicej submitted PR review:
Thanks, @macovedj!
macovedj updated PR #14460.
cfallin added PR #14460 Component async coop yield to the merge queue.
:check: cfallin merged PR #14460.
cfallin removed PR #14460 Component async coop yield from the merge queue.
Last updated: Oct 11 2026 at 02:20 UTC