summaryrefslogtreecommitdiff
path: root/Python/condvar.h
diff options
context:
space:
mode:
authorNadeem Vawda <nadeem.vawda@gmail.com>2013-10-28 21:41:24 +0100
committerNadeem Vawda <nadeem.vawda@gmail.com>2013-10-28 21:41:24 +0100
commitacf010d6b83e6ee4bc916a61b04938f2f4205810 (patch)
tree20104eff0d9561d62fc9f538a7882d7b98e00ac1 /Python/condvar.h
parent284a788ebc97e88858f9299669470438dcf0ebfb (diff)
parentc3408df66ec4dbebcbbfc283cebd9736d97f5f1c (diff)
downloadcpython-acf010d6b83e6ee4bc916a61b04938f2f4205810.tar.gz
#19395: Raise exception when pickling a (BZ2|LZMA)(Compressor|Decompressor).
The underlying C libraries provide no mechanism for serializing compressor and decompressor objects, so actually pickling these classes is impractical. Previously, these objects would be pickled without error, but attempting to use a deserialized instance would segfault the interpreter.
Diffstat (limited to 'Python/condvar.h')
-rw-r--r--Python/condvar.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/condvar.h b/Python/condvar.h
index bbb40ba18e..e022dc7938 100644
--- a/Python/condvar.h
+++ b/Python/condvar.h
@@ -241,7 +241,7 @@ _PyCOND_WAIT_MS(PyCOND_T *cv, PyMUTEX_T *cs, DWORD ms)
* but we are safe because we are using a semaphore wich has an internal
* count.
*/
- wait = WaitForSingleObject(cv->sem, ms);
+ wait = WaitForSingleObjectEx(cv->sem, ms, FALSE);
PyMUTEX_LOCK(cs);
if (wait != WAIT_OBJECT_0)
--cv->waiting;