Eroxl's Notes
Lock
aliases
Mutex

A lock is a primitive for controlling synchronization between concurrent programs. Lock's prevent state from being accessed by multiple threads at the same time. A thread can perform two operations on a lock, attempting to acquire it or release it. When attempting to acquire a lock if it's already "held" by another thread the acquiring thread will enter a waiting state until the lock is released by the holding thread.