bug 1234979 addition

This commit is contained in:
Georg Brandl 2005-07-09 15:26:33 +00:00
parent af410b510d
commit 9a3240e8e6

View File

@ -140,13 +140,13 @@ int PyThread_acquire_lock(PyThread_type_lock aLock, int waitflag)
dprintf(("%ld: PyThread_acquire_lock(%p, %d) called\n", PyThread_get_thread_ident(),aLock, waitflag));
#ifndef DEBUG
waitResult = WaitForSingleObject(aLock, (waitflag == 1 ? INFINITE : 0));
waitResult = WaitForSingleObject(aLock, (waitflag ? INFINITE : 0));
#else
/* To aid in debugging, we regularly wake up. This allows us to
break into the debugger */
while (TRUE) {
waitResult = WaitForSingleObject(aLock, waitflag ? 3000 : 0);
if (waitflag==0 || (waitflag==1 && waitResult == WAIT_OBJECT_0))
if (waitflag==0 || (waitflag && waitResult == WAIT_OBJECT_0))
break;
}
#endif