lock method
void
lock()
Locks the mutex.
If the mutex is already locked, this method throws MutexAlreadyLockedException.
Implementation
void lock() {
if (_isLocked) {
throw const MutexAlreadyLockedException();
}
_isLocked = true;
}