40 inline void lock()
const {
if (mutex) mutex->
lock(); }
41 inline void unlock()
const {
if (mutex) mutex->
unlock(); }
65 #define _THREAD_SAFE_CLASS_ ThreadSafe __thread__safe__; 66 #define _THREAD_SAFE_METHOD_ ThreadSafeMethod __thread_safe_method__(&__thread__safe__); 67 #define _THREAD_SAFE_LOCK_ __thread__safe__.lock(); 68 #define _THREAD_SAFE_UNLOCK_ __thread__safe__.unlock(); 72 #define _THREAD_SAFE_CLASS_ 73 #define _THREAD_SAFE_METHOD_ 74 #define _THREAD_SAFE_LOCK_ 75 #define _THREAD_SAFE_UNLOCK_
Definition: thread_safe.h:35
virtual void unlock()=0
Unlock the mutex, let other threads continue.
virtual void lock()=0
Lock the mutex, block if locked by someone else.
Definition: thread_safe.h:49