Very limited shared promotion
Walter Bright
newshound2 at digitalmars.com
Tue Jun 18 20:05:25 UTC 2019
On 6/18/2019 6:29 AM, Steven Schveighoffer wrote:
> Seems like it would be safe,
When dealing with concurrency, that's like throwing a bunch of chemicals into a
vat and saying it seems safe to drink :-)
Just remember that doubled checked locking fooled a lot of very smart people for
many years. I got snookered by it, too.
Not sure where I read about it recently, but some expert had come up with a lock
free algorithm, and the bug was only discovered a couple years later.
Unless you are really, really good at concurrency, it's best to stick with
atomics and locks, every time.
More information about the Digitalmars-d
mailing list