31 template<
class Acquirable>
class Guard 36 : acquirable_(acquirable)
38 acquirable_.acquire();
43 acquirable_.release();
47 Acquirable & acquirable_;
Performs automatic acquisition and release of a synchronization object.
~Guard()
Releases the synchronization object upon destruction.
Guard< Semaphore > SemaphoreGuard
Guard< Mutex > MutexGuard
Guard(Acquirable &acquirable)
Acquires the given synchronization object upon initialization.