29template<
class Acquirable>
class Guard
34 : acquirable_(acquirable)
36 acquirable_.acquire();
41 acquirable_.release();
45 Acquirable & acquirable_;
#define ONIXS_ICEBOE_NAMESPACE_BEGIN
#define ONIXS_ICEBOE_NAMESPACE_END
Performs automatic acquisition and release of a synchronization object.
~Guard()
Releases the synchronization object upon destruction.
Guard(Acquirable &acquirable)
Acquires the given synchronization object upon initialization.
Guard< Mutex > MutexGuard
Guard< Semaphore > SemaphoreGuard