Hello, sorry for commenting on this old issue, but with the new component-model-async APIs, I couldn't find a way to drop a guest's resource, I'm within a wasmtime::component::AccessorTask with a guest exported ResourceAny, and I couldn't use accessor.with(|store| resource.resource_drop_async(store)) due to trying to return a future that captures store.
For now, I'm writing as accessor.with(|store| futures::block_on(resource.resource_drop_async(store))), but no idea whether this is the intended way, or will it cause deadlocks because it will block the store's event loop
Originally posted by @SilverMira in #9946
As confirmed by @alexcrichton in the above issue, Wasmtime doesn't yet have an intended way to drop a guest's ResourceAny within Store::run_concurrent
We probably need something like a async fn resource_drop_concurrent(self, accessor: impl AsAccessor) -> wasmtime::Result<()> on ResourceAny
Originally posted by @SilverMira in #9946
As confirmed by @alexcrichton in the above issue, Wasmtime doesn't yet have an intended way to drop a guest's
ResourceAnywithinStore::run_concurrentWe probably need something like a
async fn resource_drop_concurrent(self, accessor: impl AsAccessor) -> wasmtime::Result<()>onResourceAny