Skip to content

Commit 3f9321a

Browse files
committed
refactor poll_until to only ever call wasm inside a fiber
With `wasmtime`'s `async` support enabled, all guest export calls need to happen in a fiber because the guest may call back to the host, which may try to suspend the fiber and return control to the top-level async executor. In fact, even if the guest doesn't call back to the host, epoch interruption might be enabled, in which case the code might be instrumented with yield calls that do the same thing. In the process of this refactor, I discovered a couple of other issues (e.g. not removing tasks from the "yielding" set when disposing of them) and fixed those as well. Fixes #9. Signed-off-by: Joel Dice <[email protected]>
1 parent 798b8c9 commit 3f9321a

File tree

4 files changed

+254
-345
lines changed

4 files changed

+254
-345
lines changed

0 commit comments

Comments
 (0)