|
From: Christopher G. <cg...@ro...> - 2025-04-25 11:33:53
|
Hi PLEXIL devs and users!
I was wondering how one could solve "variable contention" in cases where 2 or more concurrent blocks want so set a global "flag" variable to a value of 1 but I cannot guarantee that this writing to the variable will always happen at non-equal points in time.
Short simplified example:
MyConcurrence:
Concurrence
{
Integer flag = 0;
BlockA:
{
Wait 3.0, 1.0;
flag = 1;
}
BlockB:
{
Wait 3.0, 1.0;
flag = 1;
}
}
PlexilExec.cc handles these conflicts by using a VariableConflictSet and a comment mentions a "priority" there. Is there a way to give a higher priority to the assignment in BlockA ?
Thanks for your help!
Regards from Germany,
Christopher
[cid:34a17f52-a99b-4448-a419-919a3ff7484a]
Christopher Gaudig
Software Developer
Subsea Structures
T +4942120095703
|