(ctx: &mut Option<Arc<Mutex<T>>>)
| 1523 | } |
| 1524 | |
| 1525 | fn 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 | |
| 1533 | impl WasiView for Host { |
| 1534 | fn ctx(&mut self) -> WasiCtxView<'_> { |