mirror of
https://github.com/python/cpython.git
synced 2025-09-17 06:06:25 +00:00
bug [ 1234979 ] Lock.acquire treats only 1 as True
This commit is contained in:
parent
8b687cf683
commit
af410b510d
2 changed files with 4 additions and 1 deletions
|
@ -103,6 +103,9 @@ Core and builtins
|
||||||
Extension Modules
|
Extension Modules
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Bug #1234979: For the argument of thread.Lock.acquire, the Windows
|
||||||
|
implemented treated all integer values except 1 as false.
|
||||||
|
|
||||||
- Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
|
- Bug #1194181: bz2.BZ2File didn't handle mode 'U' correctly.
|
||||||
|
|
||||||
- Patch #1212117: os.stat().st_flags is now accessible as a attribute
|
- Patch #1212117: os.stat().st_flags is now accessible as a attribute
|
||||||
|
|
|
@ -299,7 +299,7 @@ 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));
|
dprintf(("%ld: PyThread_acquire_lock(%p, %d) called\n", PyThread_get_thread_ident(),aLock, waitflag));
|
||||||
|
|
||||||
success = aLock && EnterNonRecursiveMutex((PNRMUTEX) aLock, (waitflag == 1 ? INFINITE : 0)) == WAIT_OBJECT_0 ;
|
success = aLock && EnterNonRecursiveMutex((PNRMUTEX) aLock, (waitflag ? INFINITE : 0)) == WAIT_OBJECT_0 ;
|
||||||
|
|
||||||
dprintf(("%ld: PyThread_acquire_lock(%p, %d) -> %d\n", PyThread_get_thread_ident(),aLock, waitflag, success));
|
dprintf(("%ld: PyThread_acquire_lock(%p, %d) -> %d\n", PyThread_get_thread_ident(),aLock, waitflag, success));
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue