alexcrichton requested rvolosatovs for a review on PR #11414.
alexcrichton requested dicej for a review on PR #11414.
alexcrichton requested wasmtime-core-reviewers for a review on PR #11414.
alexcrichton requested wasmtime-default-reviewers for a review on PR #11414.
alexcrichton opened PR #11414 from alexcrichton:refactor-abort-handle to bytecodealliance:main:
This commit is inspired by recent discussions about providing more guarantees around dropping WASI resources. This commit renames
wasmtime::component::AbortHandletowasmtime::component::JoinHandleand additionally implementsFuture for JoinHandleto know when the associated task's future has been dropped. The renaming is intended to more closely align withtokio::task::JoinHandlewheretokio::task::AbortHandleis notably different and doesn't have aFutureimplementation. TheFutureimplementation helps embedders know exactly when a value has been dropped and synchronize on that.<!--
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 ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->
pchickey submitted PR review:
Abort on drop is an important difference over the tokio JoinHandle (and why we ended up with the mouthful https://docs.rs/wasmtime-wasi/latest/wasmtime_wasi/runtime/struct.AbortOnDropJoinHandle.html) so lets document it prominently
pchickey created PR review comment:
It would be useful to note here the task can also be aborted by dropping the JoinHandle
pchickey created PR review comment:
Useful to note here that dropping the JoinHandle will also abort.
alexcrichton updated PR #11414.
alexcrichton commented on PR #11414:
Oh the previous
AbortHandle, nor the newJoinHandlename, have abort-on-drop behavior. We'll probably still want to end up with a similar structure for tokio tasks for async tasks, but I figured I'd leave that for the wasmtime-wasi crate.
dicej submitted PR review.
alexcrichton merged PR #11414.
Last updated: Dec 06 2025 at 06:05 UTC