Unsynchronized int access from threads
claptrap
clap at trap.com
Thu Jun 18 22:01:56 UTC 2020
On Thursday, 18 June 2020 at 16:42:15 UTC, H. S. Teoh wrote:
> Suppose I have an int[] which may contain some zeroes, and 2
> functions, one scans the array for zeroes but does not modify
> it, and the other modifies array elements but never introduces
> new zeroes (though it may write a 0 to an existing 0). Is it
> thread-safe to run the two functions in parallel without any
> synchronization between them?
>
Found the relevant doc
http://www.cs.cmu.edu/~410-f10/doc/Intel_Reordering_318147.pdf
More information about the Digitalmars-d
mailing list