atomicLoad/Store
John Colvin
john.loughran.colvin at gmail.com
Wed Aug 7 08:23:51 PDT 2013
On Monday, 5 August 2013 at 20:22:37 UTC, zyhong wrote:
> From my understanding, any data type that is less than 32bit
> (bool, char, int, etc) is atomic and there is no need to use
> atomicLoad/Store and read/write the data to be thread safe. In
> std.parallelism, I saw it use atomicLoad/Store for any shared
> data. Could anyone clarify if it is really necessary to
> atomicLoad/Store to read/write data that datatype is bool, int,
> byte, etc?
I would highly recommend watching this talk to get a really solid
understanding of the topic:
http://channel9.msdn.com/Shows/Going+Deep/Cpp-and-Beyond-2012-Herb-Sutter-atomic-Weapons-1-of-2
http://channel9.msdn.com/Shows/Going+Deep/Cpp-and-Beyond-2012-Herb-Sutter-atomic-Weapons-2-of-2
More information about the Digitalmars-d
mailing list