aboutsummaryrefslogtreecommitdiff
path: root/src/3rdParty/efsw/Lock.hpp
blob: e8c522abf0d70097e795c6a931b43247ca4c9b6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#ifndef EFSW_LOCK_HPP
#define EFSW_LOCK_HPP

#include <efsw/Mutex.hpp>

namespace efsw {

/** Simple mutex class */
class Lock {
  public:
	explicit Lock( Mutex& mutex ) : mMutex( mutex ) { mMutex.lock(); }

	~Lock() { mMutex.unlock(); }

  private:
	Mutex& mMutex;
};

} // namespace efsw

#endif