Stream: git-wasmtime

Topic: wasmtime / PR #14343 `async-component-model`: Set HostTas...


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

adamrk opened PR #14343 from adamrk:abk/set-host-task-when-polling to bytecodealliance:main:

When lowering a borrowed resource in a HostTask, the scope is looked up through unforced_current_thread in the ConcurrentState. But that field only holds the HostTasks ID during the initial poll in poll_and_block or first_poll. If the task does not resolve on the first poll it will be added to the FuturesUnordered within ConcurrentState to be polled later in the main loop of poll_until. But that loop doesn't set unforced_current_thread so any attempt to lower a borrow then will fail to find the required scope.

This fixes the issue by setting the thread each time we poll the future in the main loop. Without the fix the added test would fail with the error BUG: no current scope from ResourceTables::current_scope_id.

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

adamrk requested dicej for a review on PR #14343.

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

adamrk requested wasmtime-core-reviewers for a review on PR #14343.

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2026 at 19:56):

:thumbs_up: dicej submitted PR review:

Thanks, @adamrk!

view this post on Zulip Wasmtime GitHub notifications bot (Sep 15 2026 at 19:56):

dicej added PR #14343 async-component-model: Set HostTask when polling to the merge queue.

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

:check: dicej merged PR #14343.

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

dicej removed PR #14343 async-component-model: Set HostTask when polling from the merge queue.


Last updated: Sep 20 2026 at 18:08 UTC