]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
gh-59705: Implement _thread.set_name() on Windows (#128675)
authorVictor Stinner <vstinner@python.org>
Fri, 17 Jan 2025 13:55:43 +0000 (14:55 +0100)
committerGitHub <noreply@github.com>
Fri, 17 Jan 2025 13:55:43 +0000 (14:55 +0100)
commitd7f703d54d64c5a380f43e2363c439f7dab0d09d
treea0673002140047189152d7ee29077f78f0c770e7
parent76856ae1659dbba066e51f353b31cb7cf0a8a5fe
gh-59705: Implement _thread.set_name() on Windows (#128675)

Implement set_name() with SetThreadDescription() and _get_name() with
GetThreadDescription(). If SetThreadDescription() or
GetThreadDescription() is not available in kernelbase.dll, delete the
method when the _thread module is imported.

Truncate the thread name to 32766 characters.

Co-authored-by: Eryk Sun <eryksun@gmail.com>
Lib/test/test_threading.py
Modules/_threadmodule.c
Modules/clinic/_threadmodule.c.h
PC/pyconfig.h.in