-
Notifications
You must be signed in to change notification settings - Fork 134
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Question] understanding of BoC #923
Comments
In fact,
In your example,
However, in the following case, you have b3 happens-before b2.
In this code, b3 happens-before b2 holds, since b2 is scheduled only if |
Thank you for your explanation, just for double check if I understand it. In the hw boc.rs test case boc::boc. when!(c1, c2; g1, g2; { \\b1
*g1 += 1;
*g2 += 1;
when!(c3, c2; g3, g2; { \\b2
*g2 += 1;
*g3 = true;
});
});
when!(c1, c2_, c3_; g1, g2, g3; { \\b3
assert_eq!(*g1, 1);
assert_eq!(*g2, if *g3 { 2 } else { 1 });
finish_sender.send(()).unwrap();
}); In this case, the b1 happens before b2 and b3. b2 can be only scheduled after b1 scheduled and excuted. but there is no certain order between b2 and b3 cause they don't have overlapping cowns. |
b2 and b3 do have overlapping cowns (note that |
In BoC, . A behaviour b will happen before another behavior b' iff b and b' requires overlapping sets of cowns, and b is spawned before b'. But I'm curious about the nested case, for example:
Is the DAG looks like when(c1,c2) -> when(c2, c3) -> when(c3, c4). Cause the spawned when(c2,c3) is in the thunk of when(c1,c2). Is it possible that the when(c3,c4) happens before when(c2,c3)? Or if there is something that I misunderstand?
The text was updated successfully, but these errors were encountered: