Skip to content

Expose when component model async tasks finish, not just return #11600

@alexcrichton

Description

@alexcrichton

Today Func::call_concurrent will resolve when the guest invokes task.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 of call_concurrent could always return a WasmTask argument (or something like that) which can then be used to await with an &Accessor just 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.

Metadata

Metadata

Assignees

Labels

wasm-proposal:component-model-asyncIssues related to the WebAssembly Component Model async proposalwasmtime:apiRelated to the API of the `wasmtime` crate itself

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions