Code example for Lock

Methods: tryLock, unlock