Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

At a quick glance, it doesn't solve the ABA problem.

Similar implementation that solves the ABA problem can be found here.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top