![]() |
Escalate() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Public Function |
Declared in: Win32ReadWriteLock.h |
Declaration
virtual BOOL Escalate(
unsigned long ulMSTimeout,
unsigned long ulIterations);
DescriptionEscalate write priority
Function Body
//Try to lock for write
if (LockWrite())
return TRUE;
//Try to escalate
CMutexAutoRelease aRelease(m_pMutex,TRUE);
//Change the escalation status
m_bEscalation=TRUE;
//Exit from the mutex
aRelease.Release();
//And wait to see if we can continue
for (unsigned long ulCounter=0;ulCounter<ulIterations;++ulCounter)
{
//Can we write
if (LockWrite())
return TRUE;
//Wait
Sleep(ulMSTimeout);
}
//Failed to escalate
return FALSE;
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |