X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d8845c7819caac09b95c4cdf1e8d48cc1cb1b7a6..8337f36907f14b1e9979108800e82b8e0ca47a59:/include/stg/locker.h?ds=inline diff --git a/include/stg/locker.h b/include/stg/locker.h index 2a395f37..16b0323f 100644 --- a/include/stg/locker.h +++ b/include/stg/locker.h @@ -34,6 +34,11 @@ class STG_LOCKER { public: + explicit STG_LOCKER(pthread_mutex_t& m) + : mutex(&m) + { + pthread_mutex_lock(mutex); + } explicit STG_LOCKER(pthread_mutex_t * m) : mutex(m) {