MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / call_async

Method call_async

crates/wasmtime/src/runtime/func.rs:1113–1127  ·  view source on GitHub ↗
(
        &self,
        mut store: impl AsContextMut<Data: Send>,
        params: &[Val],
        results: &mut [Val],
    )

Source from the content-addressed store, hash-verified

1111 /// details on Wasmtime's out-of-memory handling.
1112 #[cfg(feature = "async")]
1113 pub async fn call_async(
1114 &self,
1115 mut store: impl AsContextMut<Data: Send>,
1116 params: &[Val],
1117 results: &mut [Val],
1118 ) -> Result<()> {
1119 let mut store = store.as_context_mut();
1120
1121 self.call_impl_check_args(&mut store, params, results)?;
1122
1123 let result = store
1124 .on_fiber(|store| unsafe { self.call_impl_do_call(store, params, results) })
1125 .await??;
1126 Ok(result)
1127 }
1128
1129 /// Perform dynamic checks that the arguments given to us match
1130 /// the signature of this function and are appropriate to pass to this

Callers 15

bench_host_to_wasmFunction · 0.45
bench_instanceFunction · 0.45
load_main_moduleMethod · 0.45
call_component_funcMethod · 0.45
invoke_funcMethod · 0.45
callMethod · 0.45
async_then_sync_trapFunction · 0.45
sync_then_async_trapFunction · 0.45
call_wrapped_async_funcFunction · 0.45
call_linked_func_asyncFunction · 0.45
basic_async_hookFunction · 0.45

Calls 5

OkFunction · 0.85
call_impl_check_argsMethod · 0.80
on_fiberMethod · 0.80
call_impl_do_callMethod · 0.80
as_context_mutMethod · 0.45

Tested by 15

test_many_parametersFunction · 0.36
test_many_resultsFunction · 0.36
call_a1Method · 0.36
call_a2Method · 0.36
call_a3Method · 0.36
call_a4Method · 0.36
call_a5Method · 0.36
call_a6Method · 0.36
call_a7Method · 0.36
call_a8Method · 0.36
call_a9Method · 0.36