pub fn with<R: Send + 'static>(
ctx: &Context,
f: impl FnOnce(&mut Kernel) -> R + Send + 'static,
) -> (Synced, R)Expand description
Bring this thread’s mirror to ctx and run f on its kernel. The mirror is out of its slot
while f runs, so a sync inside f builds its own and this one is put back after.