Tag: spinlocks

  • Can non-overlapping spinlocks deadlock in C++?

    There has been discussion on Twitter recently about whether or not the C++ memory model allows spinlocks to deadlock if they just use memory_order_acquire in lock and memory_order_release in unlock, due to compiler optimizations. The case in question i…