Public Methods
Protected Members
class CSingleLock
It's a locker object.
The class CSingleLock try to acquire the object passed as parameter.
Example:
...
...
CMutex mtx;
...
...
// this function acquire the mutex and release it before return to the caller.
int mySynchronizedFun()
{
CSingleLock lck(mtx, TRUE);
...
...
if(someCondition)
return -1;
...
...
return 0;
}
...
...
|
CSingleLock (CSyncObject* pObject, BOOL bInitialLock = FALSE)
| CSingleLock |
Build the locker. If bInitialLock is TRUE try to acquire immediately
the synchronization object.
~CSingleLock ()
| ~CSingleLock |
[virtual]
Destroy the locker, releasing the synchronization object.
BOOL Lock (DWORD dwTimeOut = INFINITE)
| Lock |
Lock the synchronization object.
Unlock the synchronization object.
Lock the synchronization object.
BOOL IsLocked ()
| IsLocked |
Return TRUE if the synchronization object is locked.
[protected]
BOOL m_bAcquired
| m_bAcquired |
[protected]
Generated by: nicola on gulliver.wadahome.it on Sun May 25 13:54:34 2003, using kdoc 2.0a53. |