This fixes two small races we had while simultaneously reading from and writing to the vertex timestamp, and simultaneously writing to the vertex isStateOK (dirty) flag. They were actually "safe" races, in that it doesn't matter if the read/write race got the old or new value, or that the double write happened. The time sequencing was correct (I believe) in both cases, but this triggers the race detector now that we have tests for it.
22 lines
458 B
Plaintext
22 lines
458 B
Plaintext
-- main.mcl --
|
|
# check for timestamp or other state races in the resource engine
|
|
print "print1" {
|
|
msg => "i am print1",
|
|
|
|
Meta:autogroup => false,
|
|
}
|
|
|
|
print "print2" {
|
|
msg => "i am print2",
|
|
|
|
Meta:autogroup => false,
|
|
|
|
Depend => Print["print1"],
|
|
}
|
|
-- OUTPUT --
|
|
Edge: print[print1] -> print[print2] # print[print1] -> print[print2]
|
|
Field: print[print1].Msg = "i am print1"
|
|
Field: print[print2].Msg = "i am print2"
|
|
Vertex: print[print1]
|
|
Vertex: print[print2]
|