diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2013-01-25 13:25:48 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2013-01-25 13:25:48 (GMT) |
commit | b26a9b10ea5f095da0c699e41b29a724021cd09a (patch) | |
tree | 16bc11c938232612a40e511950e5f2b5843563c7 /Modules/_multiprocessing/semaphore.c | |
parent | 3f50bf652bae5e3371972eb261973238c62cc17b (diff) | |
download | cpython-b26a9b10ea5f095da0c699e41b29a724021cd09a.zip cpython-b26a9b10ea5f095da0c699e41b29a724021cd09a.tar.gz cpython-b26a9b10ea5f095da0c699e41b29a724021cd09a.tar.bz2 |
Replace WaitForSingleObject with WaitForSingleObjectEx,
for better WinRT compatibility.
Diffstat (limited to 'Modules/_multiprocessing/semaphore.c')
-rw-r--r-- | Modules/_multiprocessing/semaphore.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_multiprocessing/semaphore.c b/Modules/_multiprocessing/semaphore.c index eb3fa0c..bdf56a9 100644 --- a/Modules/_multiprocessing/semaphore.c +++ b/Modules/_multiprocessing/semaphore.c @@ -43,7 +43,7 @@ _GetSemaphoreValue(HANDLE handle, long *value) { long previous; - switch (WaitForSingleObject(handle, 0)) { + switch (WaitForSingleObjectEx(handle, 0, FALSE)) { case WAIT_OBJECT_0: if (!ReleaseSemaphore(handle, 1, &previous)) return MP_STANDARD_ERROR; @@ -99,7 +99,7 @@ semlock_acquire(SemLockObject *self, PyObject *args, PyObject *kwds) } /* check whether we can acquire without releasing the GIL and blocking */ - if (WaitForSingleObject(self->handle, 0) == WAIT_OBJECT_0) { + if (WaitForSingleObjectEx(self->handle, 0, FALSE) == WAIT_OBJECT_0) { self->last_tid = GetCurrentThreadId(); ++self->count; Py_RETURN_TRUE; |