26 #if ! defined (octave_oct_mutex_h)
27 #define octave_oct_mutex_h 1
29 #include "octave-config.h"
44 OCTAVE_DEFAULT_CONSTRUCT_COPY_MOVE (
base_mutex)
62 OCTAVE_DEFAULT_COPY_MOVE_DELETE (
mutex)
76 return m_rep->try_lock ();
80 std::shared_ptr<base_mutex>
m_rep;
89 : m_mutex (
m), m_lock_result (false)
97 m_lock_result = m_mutex.try_lock ();
100 OCTAVE_DISABLE_CONSTRUCT_COPY_MOVE (
autolock)
108 bool ok ()
const {
return m_lock_result; }
110 operator bool ()
const {
return ok (); }
131 OCTAVE_END_NAMESPACE(
octave)
autolock(const mutex &m, bool block=true)
std::shared_ptr< base_mutex > m_rep
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn