Reputation: 61
For some reason I got in my head that
if (someAtomicBool) return;
someAtomicBool = false;
Is adequate control for a critical section. This is not the case, right? I think the correct way to do this and achieve the functionality I'm looking for is to check if a mutex is locked or something.
Upvotes: 0
Views: 26