Masayuki Yamamoto added the comment:

I wrote a patch based on msg281227's idea.  I confirmed to pass related tests 
(test_capi, test_threading and test_tracemalloc) on Cygwin x86 and Ubuntu 16.04 
x86.

This patch adds to change CPython about:

1. Avoid compile error on Currently TLS API.
   With POSIX threads, configure script checks pthread_key_t type. And if the 
type is not integer, TLS API is implemented empty (do nothing or return fail).
2. Implement New TSS API based on C11 threads.
   Thread key type is changed wrapped native TLS key type by typedef instead of 
integer, and the key parameter on key create function is changed to calling by 
pointer.  Key create function doesn't support destructor because users have 
need to manage memory.  And this patch changes Currently TLS API to call New 
TSS API. Or does it need to keep implementation?
3. Move to TSS API.
   Py_DEPRECATED(3.7) is added to TLS API declaration, and 
Modules/_tracemalloc.c and Python/pystate.c are modified to use TSS API instead 
of TLS API.

----------
Added file: http://bugs.python.org/file45763/pythread-tss.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25658>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to