alexcrichton opened PR #14558 from alexcrichton:fix-more-waitable-set to bytecodealliance:main:
Fix a spec-conformance issue where waitable sets prevent drop while something is waiting on them, not just blocked on them. For example if a thread is woken from a waitable set the waitable set can't be dropped until that thread has woken up to process the event.
Fix an issue where with threads a yield event from one thread could be stolen by another thread.
Fix situations where a waitable set's blocked thread is woken but by the time it runs the event it was supposed to receive was stolen by something else (e.g. a poll). In this situation threads generally just go back to sleep automatically without running more wasm.
This fixes a number of spec conformance issues as well as
bail_bug!s that can be encountered otherwise.<!--
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 cfallin for a review on PR #14558.
alexcrichton requested wasmtime-core-reviewers for a review on PR #14558.
alexcrichton unassigned cfallin from PR #14558 Fix some issues with waitable sets and stealing events.
alexcrichton requested dicej for a review on PR #14558.
:memo: dicej submitted PR review.
:speech_balloon: dicej created PR review comment:
How is this different from
waiting.len()?
github-actions[bot] added the label wasmtime:api on PR #14558.
:memo: alexcrichton submitted PR review.
:speech_balloon: alexcrichton created PR review comment:
I mostly intended to match the spec with this, but this count is effectively a superset of what's in
waiting-- once something is removed fromwaitingand notified it's still accounted for innum_waitinguntil it actually wakes up and runs.
:thumbs_up: dicej submitted PR review.
alexcrichton added PR #14558 Fix some issues with waitable sets and stealing events to the merge queue.
:check: alexcrichton merged PR #14558.
alexcrichton removed PR #14558 Fix some issues with waitable sets and stealing events from the merge queue.
Last updated: Oct 11 2026 at 04:10 UTC