Replaced boolean with enum in c'tor.

Implemented in a similar style to FPEnvironment.
This commit is contained in:
martin-osborne
2015-01-14 10:48:22 +00:00
parent f9942829d3
commit 00b568193c
12 changed files with 59 additions and 23 deletions

View File

@@ -49,9 +49,16 @@ class Foundation_API Mutex: private MutexImpl
/// lock and unlock a mutex.
{
public:
enum MutexType
/// The type of a mutex.
{
MUTEX_RECURSIVE = MUTEX_RECURSIVE_IMPL, /// A recursive mutex
MUTEX_NONRECURSIVE = MUTEX_NONRECURSIVE_IMPL, /// A non-recursive mutex
};
typedef Poco::ScopedLock<Mutex> ScopedLock;
explicit Mutex(bool recursive = true);
explicit Mutex(MutexType type = MUTEX_RECURSIVE);
/// creates the Mutex.
~Mutex();