|
|
|
|
|
by Twey
89 days ago
|
|
But there are data races. Mem as I set it out above is an example of multi-threaded, mutable data. Another process can't alter the data you've received, indeed, just as in a shared-memory system another thread can't alter the data after you copy it out of shared memory into your registers or an unshared memory space. But if you're storing the data in shared memory (a.k.a. requesting it from Mem every time) then you are racing with other actors who have access to Mem. |
|
You're describing a logical race, something unintended but allowed due to interleaving behavior, not a data one. Logical races are a heck of a lot harder to prevent without going fully proof-oriented.