Skip to content

Switch Python to using native Win32 condition variables #104530

Closed
@adr26

Description

@adr26

Py_HAVE_CONDVAR denotes support for Python condition variable APIs. On Win32, the _PY_EMULATED_WIN_CV macro exists to allow condition variables to be emulated using Win32 critical section and semaphore APIs.

Native Win32 support for condition variables has existed from Windows Vista onwards (courtesy of my friend and fellow ex-MSFT colleague Neill Clift).

An implementation of Python condition variable also exists with _PY_EMULATED_WIN_CV set to 0 which uses native Win32 condition variable / SRW lock (mutex) support.

Since support for Windows XP was dropped as of Python 3.5, I propose moving to the native Win32 condition variable APIs, as they are more efficient and easier to maintain.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions