Logo ROOT   6.18/05
Reference Guide
List of all members | Public Member Functions | List of all members
TVirtualMutex Class Referenceabstract

This class implements a mutex interface.

The actual work is done via TMutex which is available as soon as the thread library is loaded.

and

TLockGuard

This class provides mutex resource management in a guaranteed and exception safe way. Use like this:

{
TLockGuard guard(mutex);
... // do something
}

when guard goes out of scope the mutex is unlocked in the TLockGuard destructor. The exception mechanism takes care of calling the dtors of local objects so it is exception safe.

Definition at line 34 of file TVirtualMutex.h.

Public Member Functions

 TVirtualMutex (Bool_t=kFALSE)
 
virtual ~TVirtualMutex ()
 
Int_t Acquire ()
 
virtual Int_t CleanUp ()=0
 
virtual TVirtualMutexFactory (Bool_t=kFALSE)=0
 
virtual Int_t Lock ()=0
 
Int_t Release ()
 
virtual Int_t TryLock ()=0
 
virtual Int_t UnLock ()=0
 

#include <TVirtualMutex.h>

Inheritance diagram for TVirtualMutex:
[legend]

Constructor & Destructor Documentation

◆ TVirtualMutex()

TVirtualMutex::TVirtualMutex ( Bool_t  = kFALSE)
inline

Definition at line 37 of file TVirtualMutex.h.

◆ ~TVirtualMutex()

virtual TVirtualMutex::~TVirtualMutex ( )
inlinevirtual

Definition at line 38 of file TVirtualMutex.h.

Member Function Documentation

◆ Acquire()

Int_t TVirtualMutex::Acquire ( )
inline

Definition at line 44 of file TVirtualMutex.h.

◆ CleanUp()

virtual Int_t TVirtualMutex::CleanUp ( )
pure virtual

Implemented in TMutex, and ROOT::TVirtualRWMutex.

◆ Factory()

virtual TVirtualMutex * TVirtualMutex::Factory ( Bool_t  = kFALSE)
pure virtual

◆ Lock()

virtual Int_t TVirtualMutex::Lock ( )
pure virtual

Implemented in TMutex, and ROOT::TVirtualRWMutex.

◆ Release()

Int_t TVirtualMutex::Release ( )
inline

Definition at line 45 of file TVirtualMutex.h.

◆ TryLock()

virtual Int_t TVirtualMutex::TryLock ( )
pure virtual

Implemented in TMutex, and ROOT::TVirtualRWMutex.

◆ UnLock()

virtual Int_t TVirtualMutex::UnLock ( )
pure virtual

Implemented in TMutex, and ROOT::TVirtualRWMutex.


The documentation for this class was generated from the following file: