dicej requested alexcrichton for a review on PR #15361.
dicej requested wasmtime-core-reviewers for a review on PR #15361.
dicej opened PR #15361 from dicej:fix-14769-part-2 to bytecodealliance:main:
This expands on my earlier PR to address #14769. That earlier PR addressed the starvation issue by making
Accessor::poll_ready_for_concurrent_callwait for all queued work items to be drained before returningPoll::Ready(()). However, that requires the host embedder to know to call that function explicitly; it can't help if it isn't called.This time, I've changed
StoreContextMut::stage_callto add new host->guest calls to the low priority queue instead of the high one, thereby ensuring that they end up behind any existing, yielding guest tasks. Consequently, it is no longer possible for the host to start new calls so quickly that existing, yielding tasks are starved.Note that this required tweaking a few tests which implicitly relied on the old behavior.
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease review the Bytecode Alliance's AI tool usage policy at
https://github.com/bytecodealliance/governance/blob/main/AI_TOOL_POLICY.mdPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
github-actions[bot] added the label wasmtime:api on PR #15361.
:thumbs_up: alexcrichton submitted PR review.
dicej updated PR #15361.
dicej has enabled auto merge for PR #15361.
dicej added PR #15361 add host-initiated calls to low priority queue instead of high to the merge queue.
:check: dicej merged PR #15361.
dicej removed PR #15361 add host-initiated calls to low priority queue instead of high from the merge queue.
Last updated: Nov 19 2026 at 20:05 UTC