28 template<
class Acquirable>
class Guard 33 : acquirable_(acquirable) {
34 acquirable_.acquire();
39 acquirable_.release();
43 Acquirable & acquirable_;
Performs automatic acquisition and release of synchronization object.
~Guard()
Releases synchronization object upon destruction.
Guard< Mutex > MutexGuard
Guard(Acquirable &acquirable)
Acquires synchronization object upon initialization.
Guard< Semaphore > SemaphoreGuard