# Poco

# template < class M >

# class ScopedUnlock

Library: Foundation
Package: Threading
Header: Poco/ScopedUnlock.h

## Description

A class that simplifies thread synchronization with a mutex. The constructor accepts a Mutex and unlocks it. The destructor locks the mutex.

## Constructors

### ScopedUnlock

inline ScopedUnlock(
M & mutex,
bool unlockNow = true
);

## Destructor

### ~ScopedUnlock

inline ~ScopedUnlock();