mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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>
This commit is contained in:
parent
76856ae165
commit
d7f703d54d
4 changed files with 123 additions and 15 deletions
|
@ -753,4 +753,8 @@ Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
|
|||
/* Define if libssl has X509_VERIFY_PARAM_set1_host and related function */
|
||||
#define HAVE_X509_VERIFY_PARAM_SET1_HOST 1
|
||||
|
||||
// Truncate the thread name to 64 characters. The OS limit is 32766 wide
|
||||
// characters, but long names aren't of practical use.
|
||||
#define PYTHREAD_NAME_MAXLEN 32766
|
||||
|
||||
#endif /* !Py_CONFIG_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue