Spinnaker SDK C++
4.3.0.189
 
Public Member Functions | Protected Attributes | List of all members

Named global lock which can be used over process boundaries. More...

Public Member Functions

 CGlobalLock (const char *pszName)
 Creates a global lock object name pszName. More...
 
 CGlobalLock (const gcstring &strName)
 Creates a global lock object name strName. More...
 
 ~CGlobalLock ()
 
bool IsValid (void) const
 tests whether the lock is valid More...
 
bool Lock (unsigned int timeout_ms)
 enters the lock (may block) More...
 
bool TryLock (void)
 tries to enter the lock and returns immediately when not possible More...
 
void Unlock (void)
 leaves the lock More...
 

Protected Attributes

long m_DebugCount
 

Detailed Description

Named global lock which can be used over process boundaries.

Constructor & Destructor Documentation

◆ CGlobalLock() [1/2]

CGlobalLock ( const char *  pszName)
explicit

Creates a global lock object name pszName.

In case an object with the same name already exists a reference to the existing object will be created. If pszName is NULL an unnamed object will be created.

◆ CGlobalLock() [2/2]

CGlobalLock ( const gcstring strName)
explicit

Creates a global lock object name strName.

In case an object with the same name already exists a reference to the existing object will be created. If strName is empty an unnamed object will be created.

◆ ~CGlobalLock()

Member Function Documentation

◆ IsValid()

bool IsValid ( void  ) const

tests whether the lock is valid

◆ Lock()

bool Lock ( unsigned int  timeout_ms)

enters the lock (may block)

◆ TryLock()

bool TryLock ( void  )

tries to enter the lock and returns immediately when not possible

◆ Unlock()

void Unlock ( void  )

leaves the lock

Member Data Documentation

◆ m_DebugCount

long m_DebugCount
mutableprotected

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