mardi 31 août 2021

Why unlocking not locked std::mutex is UB?

Unlocking std::mutex that wasn't locked is UB. Why is it so? Why isn't it just have no effect, as mutex isn't locked yet, or was already unlocked, so what's the harm of calling unlock again?

Aucun commentaire:

Enregistrer un commentaire