Stream: git-wasmtime

Topic: wasmtime / PR #11414 Refactor `AbortHandle`, renamed to `...


view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 18:55):

alexcrichton requested rvolosatovs for a review on PR #11414.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 18:55):

alexcrichton requested dicej for a review on PR #11414.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 18:55):

alexcrichton requested wasmtime-core-reviewers for a review on PR #11414.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 18:55):

alexcrichton requested wasmtime-default-reviewers for a review on PR #11414.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 18:55):

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::AbortHandle to wasmtime::component::JoinHandle and additionally implements Future for JoinHandle to know when the associated task's future has been dropped. The renaming is intended to more closely align with tokio::task::JoinHandle where tokio::task::AbortHandle is notably different and doesn't have a Future implementation. The Future implementation helps embedders know exactly when a value has been dropped and synchronize on that.

<!--
Please make sure you include the following information:

Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.html

Please ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 19:23):

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

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 19:23):

pchickey created PR review comment:

It would be useful to note here the task can also be aborted by dropping the JoinHandle

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 19:23):

pchickey created PR review comment:

Useful to note here that dropping the JoinHandle will also abort.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 20:22):

alexcrichton updated PR #11414.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 20:23):

alexcrichton commented on PR #11414:

Oh the previous AbortHandle, nor the new JoinHandle name, 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.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 11 2025 at 22:58):

dicej submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Aug 12 2025 at 03:50):

alexcrichton merged PR #11414.


Last updated: Dec 06 2025 at 06:05 UTC