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