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