alexcrichton opened PR #14906 from alexcrichton:remove-thread-switching to bytecodealliance:main:
This commit adjusts the behavior added in #12736 where the thread identity was saved/restored around component model futures/streams being completed. Later in #13949 though the spec was refined to clarify that thread identity during lowering is not possible to witness, which meant that after that change the thread-switching was technically all dead code. Thread IDs can go away at any time and aren't required to outlive future/stream operations, so this now-vestigial code can lead to spurious traps using wrong table slots. Here all the switching is just removed entirely since it's no longer necessary.
<!--
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
-->
alexcrichton requested wasmtime-core-reviewers for a review on PR #14906.
alexcrichton removed the review request for wasmtime-core-reviewers from PR #14906.
alexcrichton requested cfallin for a review on PR #14906.
github-actions[bot] added the label wasmtime:api on PR #14906.
:thumbs_up: cfallin submitted PR review.
cfallin added PR #14906 Remove thread-switching around completed futures/streams to the merge queue.
:check: cfallin merged PR #14906.
cfallin removed PR #14906 Remove thread-switching around completed futures/streams from the merge queue.
Last updated: Oct 31 2026 at 23:03 UTC