Permalink
Browse files

o whitespace style.

  • Loading branch information...
1 parent b4eec5c commit 8054dc960b9b5610b5c4cdee33f616a618a5e207 @hzeller committed Sep 29, 2012
Showing with 2 additions and 0 deletions.
  1. +2 −0 util.h
View
2 util.h
@@ -62,10 +62,12 @@ namespace folve {
pthread_mutex_t mutex_;
};
+ // Useful RAII wrapper around mutex.
class MutexLock {
public:
MutexLock(Mutex *m) : mutex_(m) { mutex_->Lock(); }
~MutexLock() { mutex_->Unlock(); }
+
private:
Mutex *const mutex_;
};

0 comments on commit 8054dc9

Please sign in to comment.