Unsynchronized int access from threads

Timon Gehr timon.gehr at gmx.ch
Fri Jun 19 04:00:32 UTC 2020


On 19.06.20 00:15, H. S. Teoh wrote:
> Oh well, I'll just
> think of another way of parallelizing my code.

I think Steven just says that your reads and writes have to be atomic 
for the behavior to be defined at language level, so using core.atomic 
with memory order `raw` may in fact do what you want. (Or not, I am not 
sure what your full use case is.) I don't think in terms of generated 
assembly this will differ from what you had in mind as aligned word 
stores and loads are atomic on x86.


More information about the Digitalmars-d mailing list