Go to the documentation of this file.
31 #include <casacore/casa/aips.h>
40 #include <casacore/casa/Exceptions/Error.h>
80 int error = pthread_mutex_lock(&
itsMutex);
89 int error = pthread_mutex_unlock(&
itsMutex);
100 int error = pthread_mutex_trylock(&
itsMutex);
103 }
else if (error == EBUSY ||
117 bool trylock() {
return true; }
264 std::call_once(
itsFlag, fn, t);
void operator()(void(*fn)())
Exception for an error in a system call.
void unlock()
Unlock the mutex.
Type
Define the type of mutex.
CallOnce0 & operator=(const CallOnce0 &)
Forbid assignment.
Mutex(Type type=Auto)
Create the mutex.
void lock()
Lock the mutex.
~Mutex() noexcept(false)
Destroy the mutex.
CallOnce & operator=(const CallOnce &)
Forbid assignment.
Exception-safe lock/unlock of a mutex.
this file contains all the compiler specific defines
void operator()(void(*fn)(T), T t)
bool trylock()
Try to lock the mutex.
~ScopedMutexLock()
The destructor automatically unlocks the mutex.
Mutex & operator=(const Mutex &)
Forbid assignment.
Wrapper around a pthreads mutex.
bool Bool
Define the standard types used by Casacore.
ScopedMutexLock(Mutex &mutex)
Create a lock on the mutex.
Wrapper around std::call_once.
ScopedMutexLock & operator=(const ScopedMutexLock &)
Forbid assignment.
CallOnce: func has one arg.