26 #if ! defined (octave_oct_mutex_h)
27 #define octave_oct_mutex_h 1
29 #include "octave-config.h"
47 virtual void lock (
void);
49 virtual void unlock (
void);
51 virtual bool try_lock (
void);
72 if (--m_rep->m_count == 0)
80 if (--m_rep->m_count == 0)
102 return m_rep->try_lock ();
114 : m_mutex (
m), m_lock_result (false)
119 m_lock_result =
true;
122 m_lock_result = m_mutex.try_lock ();
137 bool ok (
void)
const {
return m_lock_result; }
139 operator bool (
void)
const {
return ok (); }
autolock(const autolock &)=delete
autolock(const mutex &m, bool block=true)
refcount< octave_idx_type > m_count
virtual ~base_mutex(void)=default
static bool is_thread(void)