(original) (raw)
Hi, python-dev.
I'd propose removing code which I think out-of-date.
CPython has provided the own implementation for thread-local storage (TLS) on Python/thread.c, it's used in the case which a platform has not supplied native TLS. However, currently all supported platforms (NT and pthreads) have provided native TLS and defined the Py\_HAVE\_NATIVE\_TLS macro with unconditional in any case.
If the code is removed, the new TLS API for PEP 539 won't have to care the reinitialization of the thread keys managed by the interpreter (i.e. PyThread\_ReInitTLS function has been working for own implementation and will be no longer necessary for new API). Does anyone have a reason we should keep it?
Regards,I'd propose removing code which I think out-of-date.
CPython has provided the own implementation for thread-local storage (TLS) on Python/thread.c, it's used in the case which a platform has not supplied native TLS. However, currently all supported platforms (NT and pthreads) have provided native TLS and defined the Py\_HAVE\_NATIVE\_TLS macro with unconditional in any case.
If the code is removed, the new TLS API for PEP 539 won't have to care the reinitialization of the thread keys managed by the interpreter (i.e. PyThread\_ReInitTLS function has been working for own implementation and will be no longer necessary for new API). Does anyone have a reason we should keep it?