What is CLANG complaining about? With or without the benefits of volatile, I think the spinlock needs to be outside of the `dispatch_apply` block because if each block has its own lock, it's essentially a no-op, the block's local lock will always be unlocked when `OSSpinLockLock` is called.