.. index:: pair: class; EE::System::Mutex .. _doxid-class_e_e_1_1_system_1_1_mutex: class EE::System::Mutex ======================= .. toctree:: :hidden: Overview ~~~~~~~~ Blocks concurrent access to shared resources from multiple threads. This class is being kept for historical reasons. :ref:`More...` .. ref-code-block:: cpp :class: doxyrest-overview-code-block #include class Mutex: private :ref:`EE::NonCopyable` { public: // methods void :ref:`lock`(); void :ref:`unlock`(); bool :ref:`tryLock`(); }; .. _details-class_e_e_1_1_system_1_1_mutex: Detailed Documentation ~~~~~~~~~~~~~~~~~~~~~~ Blocks concurrent access to shared resources from multiple threads. This class is being kept for historical reasons. Methods ------- .. index:: pair: function; lock .. _doxid-class_e_e_1_1_system_1_1_mutex_1a6f72cee2e7ed17e38d21ca8b230ee5e3: .. ref-code-block:: cpp :class: doxyrest-title-code-block void lock() :ref:`Lock ` the mutex If the mutex is already locked in another thread, this call will block the execution until the mutex is released. .. index:: pair: function; unlock .. _doxid-class_e_e_1_1_system_1_1_mutex_1acbd7dc7fc94d5db6a7c5a4ecfd9d123c: .. ref-code-block:: cpp :class: doxyrest-title-code-block void unlock() Unlock the mutex. .. index:: pair: function; tryLock .. _doxid-class_e_e_1_1_system_1_1_mutex_1a3d9e371eeb72a34025994422a5a08169: .. ref-code-block:: cpp :class: doxyrest-title-code-block bool tryLock() Tries to lock de mutex if possible.