Comment on Correctly implementing a spinlock in Modern C++Comments−jeffbee5yFor a real battle-tested combination of spinlock and futex, see https://github.com/abseil/abseil-cpp/blob/master/absl/synchr...−fisf5yJust pointing out: while this implementation is absolutely non- trivial to study, everytime I take a look at the abseil source, I am delighted with the quality of inline comments.−rigtorp5yWell isn't that just a normal lock/mutex of the "lightweight" type (only enter kernel on contention)?You cannot use that in non-preemptible context.
Comments
For a real battle-tested combination of spinlock and futex, see https://github.com/abseil/abseil-cpp/blob/master/absl/synchr...
Just pointing out: while this implementation is absolutely non- trivial to study, everytime I take a look at the abseil source, I am delighted with the quality of inline comments.
Well isn't that just a normal lock/mutex of the "lightweight" type (only enter kernel on contention)?
You cannot use that in non-preemptible context.