2 ms·
That's fair, but I seriously consider the danger of a slippery slope. To keep in mind, on a pragmatic level, that this type of global can be trivially implemen
by pizza234 4y ago
That's fair, but I seriously consider the danger of a slippery slope.
To keep in mind, on a pragmatic level, that this type of global can be trivially implemented, at a minimum, via atomics, so the cost to avoid the unsafe is near-zero.
Atomics are not supported by all the platforms, but based on my understanding of their targets (x86-64), they're supported.