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

Function unwrap_singlethread_context

src/commands/run.rs:1525–1531  ·  view source on GitHub ↗
(ctx: &mut Option<Arc<Mutex<T>>>)

Source from the content-addressed store, hash-verified

1523}
1524
1525fn unwrap_singlethread_context<T>(ctx: &mut Option<Arc<Mutex<T>>>) -> &mut T {
1526 let ctx = ctx.as_mut().expect("context not configured");
1527 Arc::get_mut(ctx)
1528 .expect("context is not compatible with threads")
1529 .get_mut()
1530 .unwrap()
1531}
1532
1533impl WasiView for Host {
1534 fn ctx(&mut self) -> WasiCtxView<'_> {

Callers 3

wasip1_ctxMethod · 0.85
httpMethod · 0.85
tlsMethod · 0.85

Calls 5

get_mutFunction · 0.85
expectMethod · 0.45
as_mutMethod · 0.45
unwrapMethod · 0.45
get_mutMethod · 0.45

Tested by

no test coverage detected