thread/Mutex: make ScopeLock an alias for std::unique_lock

This commit is contained in:
Max Kellermann 2016-12-29 11:53:24 +01:00
parent 9c11184238
commit 6fc47fbb69

View File

@ -44,16 +44,7 @@ class Mutex : public PosixMutex {};
#endif
class ScopeLock {
std::unique_lock<Mutex> lock;
public:
ScopeLock(Mutex &_mutex):lock(_mutex) {}
void Unlock() {
lock.unlock();
}
};
using ScopeLock = std::unique_lock<Mutex>;
/**
* Within the scope of an instance, this class will keep a #Mutex