News for hackers. Stuff that matters.
Re:Implementing a lightweight task scheduler in C++ by MaulingMonkey on Saturday August 22, 2015 @08:02PM (#10104266)
/volatile the flag is only supported by MSVC as far as I'm aware.

volatile the keyword was not written with the intent of being a memory barrier (edit: or atomicity for that matter) in mind.

In practice, I've created unit tests to catch and fix issues on mobile (specifically iOS - ARM arch, under both GCC and later Clang compilers IIRC) with our "lock free" circular buffer.

It was indeed lock free. And also just plain broken in multi-core scenarios.

There are no comments on this comment yet.