/// Add an execution branch point.
Add an execution branch point.
Add an execution branch point .
fn branch<F, R>(f: F) -> R
where
    F: FnOnce(&mut Execution) -> R,
{
    let (ret, switch) = execution(|execution| {
        let ret = f(execution);
        (ret, execution.schedule())
    });
    if switch {
        Scheduler::switch();
    }
    ret
}
fn branch < F , R > ( f : F ) -> R where F : FnOnce ( & mut Execution ) -> R , { let ( ret , switch ) = execution ( | execution | { let ret = f ( execution ) ; ( ret , execution . schedule ( ) ) } ) ; if switch { Scheduler :: switch ( ) ; } ret }
Add an execution branch point.
Add an execution branch point .
f
F