Skip to main content

branches_independent

Function branches_independent 

Source
pub fn branches_independent(tasks: &[Stmt<'_>]) -> bool
Expand description

Are the branches of a Parallel/Concurrent block data-independent?

Conservative (errs toward “dependent”): two branches conflict if they touch the same Pipe channel symbol, both mutate the same variable, or one mutates a variable the other references. Independent branches are determinate (their fork-join is order-free); dependent branches that share non-CRDT mutable state are a data race the Send/escape analysis (Phase 4) will reject.