I just found this:
http://www.emadar.com/fpc/lockfree.htm
at first glance it looks fine. Is anybody using it? Or maybe somebody already looked at it and found it unusable?
I just found this:
http://www.emadar.com/fpc/lockfree.htm
at first glance it looks fine. Is anybody using it? Or maybe somebody already looked at it and found it unusable?
If it is ok, it is only ok for x86 and x86_64 processors, and most likely not for PowerPC (and maybe ARM), since there are no memory barrier instructions.
I've it in production for a simple case, and noticed no problems. I use the non-generic one in Delphi though.