18 #ifndef MIR_PROOF_OF_MUTEX_LOCK_H_
19 #define MIR_PROOF_OF_MUTEX_LOCK_H_
34 if (!lock.owns_lock())
36 fatal_error(
"ProofOfMutexLock created with unlocked unique_lock");
A method can take an instance of this class by reference to require callers to hold a mutex lock,...
Definition: proof_of_mutex_lock.h:29
ProofOfMutexLock operator=(ProofOfMutexLock const &)=delete
ProofOfMutexLock(std::lock_guard< std::mutex > const &)
Definition: proof_of_mutex_lock.h:31
ProofOfMutexLock(std::unique_lock< std::mutex > const &lock)
Definition: proof_of_mutex_lock.h:32
ProofOfMutexLock(ProofOfMutexLock const &)=delete
Definition: splash_session.h:24
void(* fatal_error)(char const *reason,...)
fatal_error() is strictly for "this should never happen" situations that you cannot recover from.