X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/afcbfd1a09e22ff4839ba5db42047c96f355506c..0c097ef3435d2a45c1ee4ac80f8bd3f254fb8df5:/include/stg/locker.h 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) {