diff options
Diffstat (limited to 'CommonLibs')
-rw-r--r-- | CommonLibs/Threads.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/CommonLibs/Threads.h b/CommonLibs/Threads.h index c61a3d8..eba8e89 100644 --- a/CommonLibs/Threads.h +++ b/CommonLibs/Threads.h @@ -81,6 +81,8 @@ class Mutex { void lock() { pthread_mutex_lock(&mMutex); } + bool trylock() { return pthread_mutex_trylock(&mMutex)==0; } + void unlock() { pthread_mutex_unlock(&mMutex); } friend class Signal; |