alexcrichton opened issue #11600:
Today
Func::call_concurrentwill resolve when the guest invokestask.return, but the guest can continue running. This concept, supported by the component model, should be modeled in Wasmtime's embedder API as well. For example the return value ofcall_concurrentcould always return aWasmTaskargument (or something like that) which can then be used to await with an&Accessorjust as a function could be called concurrently. This would enable the embedder to, optionally, explicitly wait on guests that would like to continue running. Additionally the embedder could learn about traps during this time frame, but no other results would come out of the guest.
alexcrichton added the wasmtime:api label to Issue #11600.
alexcrichton added the wasm-proposal:component-model-async label to Issue #11600.
rvolosatovs commented on issue #11600:
This makes a lot of sense! As an embedder I would expect to be able to acquire a construct similar to https://docs.rs/tokio/latest/tokio/task/struct.JoinSet.html
alexcrichton assigned dicej to issue #11600.
dicej closed issue #11600:
Today
Func::call_concurrentwill resolve when the guest invokestask.return, but the guest can continue running. This concept, supported by the component model, should be modeled in Wasmtime's embedder API as well. For example the return value ofcall_concurrentcould always return aWasmTaskargument (or something like that) which can then be used to await with an&Accessorjust as a function could be called concurrently. This would enable the embedder to, optionally, explicitly wait on guests that would like to continue running. Additionally the embedder could learn about traps during this time frame, but no other results would come out of the guest.
Last updated: Dec 06 2025 at 07:03 UTC