Stream: git-wasmtime

Topic: wasmtime / PR #12357 [async] Give more priority to high-p...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2026 at 11:33):

TartanLlama opened PR #12357 from TartanLlama:sy/high-priority-queue to bytecodealliance:main:

Currently, the main async event loop processes either all of the high-priority work items, or all of the low-priority work items if there are no high-priority items. This means that, if there are multiple low-priority tasks and an early one adds a task to the high-priority queue, this new task has to wait for the remaining low-priority tasks to complete before it gets a chance to run.

This PR changes the event loop to run at most one low-priority task on every iteration. As such, if this task enqueues a high-priority task, that task will get a chance to run before any other low-priority tasks.

I also reduced the nesting of the poll_until loop and added better names to make the code more easily understandable.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2026 at 11:33):

TartanLlama requested alexcrichton for a review on PR #12357.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2026 at 11:33):

TartanLlama requested wasmtime-core-reviewers for a review on PR #12357.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2026 at 11:34):

TartanLlama edited PR #12357:

Currently, the main async event loop processes either all of the high-priority work items, or all of the low-priority work items if there are no high-priority items. This means that, if there are multiple low-priority tasks and an early one adds a task to the high-priority queue, this new task has to wait for the remaining low-priority tasks to complete before it gets a chance to run.

This PR changes the event loop to run at most one low-priority task on every iteration. As such, if this task enqueues a high-priority task, that task will get a chance to run before any other low-priority tasks.

I also reduced the nesting of the poll_until loop, factored out pulling the work items out of ConcurrentState, and added better names to make the code more easily understandable.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2026 at 13:02):

github-actions[bot] added the label wasmtime:api on PR #12357.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2026 at 15:50):

alexcrichton requested dicej for a review on PR #12357.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2026 at 15:50):

alexcrichton unassigned alexcrichton from PR #12357 [async] Give more priority to high-priority work items.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2026 at 17:20):

dicej commented on PR #12357:

I'm working on the async_poll_stackless test failure now. Should have a fix soonish.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2026 at 18:54):

dicej commented on PR #12357:

#12360 will fix the CI failure

view this post on Zulip Wasmtime GitHub notifications bot (Jan 15 2026 at 18:58):

dicej submitted PR review:

LGTM, thanks!

view this post on Zulip Wasmtime GitHub notifications bot (Jan 16 2026 at 10:19):

TartanLlama updated PR #12357.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 16 2026 at 13:41):

dicej added PR #12357 [async] Give more priority to high-priority work items to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 16 2026 at 14:11):

dicej merged PR #12357.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 16 2026 at 14:11):

dicej removed PR #12357 [async] Give more priority to high-priority work items from the merge queue.


Last updated: Jan 29 2026 at 13:25 UTC