lock guard
The value lock() returns; the lock stays held for as long as it exists.
A guard (MutexGuard, RwLockReadGuard, ...) derefs to the protected data and releases the lock in its Drop, so the critical section is the guard's scope.
See also
The value lock() returns; the lock stays held for as long as it exists.
A guard (MutexGuard, RwLockReadGuard, ...) derefs to the protected data and releases the lock in its Drop, so the critical section is the guard's scope.
See also