Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Mutexes that are used to protect accesses to shared data may be locked using the lock() member function, and unlocked using the unlock() member function. If an exception occurs between the call to lock() and the call to unlock(), and the exception changes control flow such that unlock() is not called, the mutex will be left in the locked state and no critical sections protected by that mutex will be allowed to execute. This is likely to lead to deadlock.

...

Bibliography

[ISO/IEC 14882-2014]Subclause 30.4.2, "Locks"

...