bytecodealliance / bytecodealliance/wasmtime
Adding a "close" method to `{Future,Stream}[Producer,Consumer}` traits
Open
wasm-proposal:component-model-async
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 121
Description
@dicej in the fuzzer I'm writing I'm finding that it's difficult to know when a producer/consumer is dropped by the guest in the host. Currently this is only detect-able via `Drop for MyThing` which works well enough, but I was wondering if it would be viable to add a `fn close(...)` method on the traits? The trait method would take a `StoreContextMut` which would enable updating store state on close which would be convenient. Is this easy enough to slot in to the implementation?
Contributor guide
Assessment
This issue has not been assessed yet.