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

Function capture_stack

tests/all/async_functions.rs:871–874  ·  view source on GitHub ↗
(stacks: &Arc<Mutex<Vec<WasmBacktrace>>>, store: impl AsContext)

Source from the content-addressed store, hash-verified

869
870 let stacks = Arc::new(Mutex::new(vec![]));
871 fn capture_stack(stacks: &Arc<Mutex<Vec<WasmBacktrace>>>, store: impl AsContext) {
872 let mut stacks = stacks.lock().unwrap();
873 stacks.push(wasmtime::WasmBacktrace::force_capture(store));
874 }
875
876 linker1.func_wrap_async("", "host_capture_stack", {
877 let stacks = stacks.clone();

Callers 1

Calls 3

unwrapMethod · 0.45
lockMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected