[issue45301] pycore_condvar.h: remove Windows conditonal variable emulation, use Windows native conditional variable

STINNER Victor report at bugs.python.org
Mon Sep 27 17:24:49 EDT 2021


STINNER Victor <vstinner at python.org> added the comment:

Eryk:
> SleepConditionVariableSRW() can't be interrupted in PyCOND_WAIT() and PyCOND_TIMEDWAIT().

Oh. A comment on StackOverlow says:     

"The WaitForXxx functions accept parameters of the generic HANDLE type, which represents a handle to a kernel object. Condition variables are user-mode objects, not kernel objects, so you cannot use them with these functions, since they work only with kernel objects."

https://stackoverflow.com/questions/37522108/can-you-really-wait-on-condition-variable-with-waitfor-objects

I only created this issue because of this comment in pycore_condvar.h:
---
/* non-emulated condition variables are provided for those that want
 * to target Windows Vista.  Modify this macro to enable them.
 */
#ifndef _PY_EMULATED_WIN_CV
#define _PY_EMULATED_WIN_CV 1  /* use emulated condition variables */
#endif
---

----------
title: pycore_condvar.h: remove Windows conditonal variable emulation -> pycore_condvar.h: remove Windows conditonal variable emulation, use Windows native conditional variable

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45301>
_______________________________________


More information about the Python-bugs-list mailing list