On priority inversion in the use of a spinlock to ensure atomic access to a shared_ptr Priority inversion may be rare, but correctness doesn’t care about rarity. Click here to read the article