16 #ifndef MIR_PROOF_OF_MUTEX_LOCK_H_
17 #define MIR_PROOF_OF_MUTEX_LOCK_H_
32 if (!lock.owns_lock())
34 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:27
ProofOfMutexLock operator=(ProofOfMutexLock const &)=delete
ProofOfMutexLock(std::lock_guard< std::mutex > const &)
Definition: proof_of_mutex_lock.h:29
ProofOfMutexLock(std::unique_lock< std::mutex > const &lock)
Definition: proof_of_mutex_lock.h:30
ProofOfMutexLock(ProofOfMutexLock const &)=delete
Definition: splash_session.h:22
void(* fatal_error)(char const *reason,...)
fatal_error() is strictly for "this should never happen" situations that you cannot recover from.