80 int error = pthread_mutex_lock(&itsMutex);
89 int error = pthread_mutex_unlock(&itsMutex);
93 throw SystemCallError(
"pthread_mutex_unlock", error);
100 int error = pthread_mutex_trylock(&itsMutex);
103 }
else if (error == EBUSY ||
107 throw SystemCallError(
"pthread_mutex_trylock", error);
129 pthread_mutex_t itsMutex;
264 std::call_once(
itsFlag, fn, t);
Wrapper around std::call_once.
void operator()(void(*fn)(T), T t)
Type
Define the type of mutex.
~ScopedMutexLock()
The destructor automatically unlocks the mutex.
virtual casacore::String type() const
Implements RegionShape::type.
ScopedMutexLock(Mutex &mutex)
Create a lock on the mutex.
CallOnce: func has one arg.
bool Bool
Define the standard types used by Casacore.
CallOnce0 & operator=(const CallOnce0 &)
Forbid assignment.
ScopedMutexLock & operator=(const ScopedMutexLock &)
Forbid assignment.
Mutex & operator=(const Mutex &)
Forbid assignment.
CallOnce & operator=(const CallOnce &)
Forbid assignment.
Wrapper around a pthreads mutex.
Exception-safe lock/unlock of a mutex.
Exception for an error in a system call.
void operator()(void(*fn)())
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.