Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

C++ Language/Std/Multithreading/Locks

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

The mutually exclusive execution property of a critical section is provided by a "lock" synchronization primitive (type std::mutex with functions lock() and unlock()). The lock maintains a record of which thread called lock(), and only that "owner-thread" is allowed to call unlock(). Additional information about locks (includes interactive examples)