|
|
|
|
|
by imron
1883 days ago
|
|
Your “only” clause captures the entire definition of data race - compared to the broader category of race conditions [0] Safe rust prevents data races at compile time. It doesn’t prevent other race conditions. And “only” preventing data races, is still a non-trivial achievement! 0: https://blog.regehr.org/archives/490 |
|
Yes it is a non-trivial achievement, just I get the feeling that the advocacy for it tends to forget about the other ones.
By the way, John Regehr's example won't work if the transferXXX functions are using SQL statements without transactions across threads each with its own connection, instead of in-memory variables.