Go to the documentation of this file.
45 #if !defined(MYSQLPP_BEEMUTEX_H)
46 #define MYSQLPP_BEEMUTEX_H
59 class MYSQLPP_EXPORT BeecryptMutex
66 BeecryptMutex() MAY_THROW(MutexFailed);
75 void lock() MAY_THROW(MutexFailed);
79 bool trylock() MAY_THROW(MutexFailed);
82 void unlock() MAY_THROW(MutexFailed);
101 explicit ScopedLock(BeecryptMutex& mutex) :
108 ~ScopedLock() { mutex_.unlock(); }
111 ScopedLock(
const ScopedLock&);
112 ScopedLock& operator =(
const ScopedLock&);
114 BeecryptMutex& mutex_;
119 #endif // !defined(MYSQLPP_BEEMUTEX_H)
void lock() MAY_THROW(MutexFailed)
Acquire the mutex, blocking if it can't be acquired immediately.
Definition: beemutex.cpp:110
MUTually EXclusive lock class.
Declares the MySQL++-specific exception classes.
void unlock() MAY_THROW(MutexFailed)
Release the mutex.
Definition: beemutex.cpp:167
~BeecryptMutex()
Destroy the mutex.
Definition: beemutex.cpp:91
Exception thrown when a BeecryptMutex object fails.
Definition: exceptions.h:411
This file includes top-level definitions for use both internal to the library, and outside it....
BeecryptMutex() MAY_THROW(MutexFailed)
Create the mutex object.
Definition: beemutex.cpp:64
bool trylock() MAY_THROW(MutexFailed)
Acquire the mutex immediately and return true, or return false if it would have to block to acquire t...
Definition: beemutex.cpp:132