aboutsummaryrefslogtreecommitdiffstats
path: root/CommonLibs
diff options
context:
space:
mode:
Diffstat (limited to 'CommonLibs')
-rw-r--r--CommonLibs/Threads.h2
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;