- sometimes, it is necessary to ensure that only one request has
exclusive access to a resource
- one possibility is to use locks
declare L={NewLock}
lock L then ... end
- only a single thread can hold the lock at any one time
- other threads that attempt to acquire the lock block are entered
into the lock's queue
- whenever a thread releases the lock, the next thread in the queue
is given exclusive hold of it