[Python-Dev] Remove own implementation for thread-local storage (original) (raw)
Victor Stinner victor.stinner at gmail.com
Mon Jul 3 06:02:13 EDT 2017
- Previous message (by thread): [Python-Dev] Remove own implementation for thread-local storage
- Next message (by thread): [Python-Dev] Remove own implementation for thread-local storage
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Sadly, we only require C99 yet :-/
Victor
2017-07-03 10:19 GMT+02:00 Antoine Pitrou <solipsis at pitrou.net>:
Also note that C11, MSVC and some Unix C compilers have built-in support for thread-local variables. Example: https://github.com/numba/numba/blob/master/numba/random.c#L114-L119 Regards Antoine.
On Mon, 3 Jul 2017 10:07:06 +0200 Victor Stinner <victor.stinner at gmail.com> wrote: I'm in favor of removing it. I know that it confused people many times, they look at this fallback and found an issue, whereas I'm not aware of any platform using this fallback anymore.
Can you please write a PR just to remove this fallback? We can merge it and then check buildbots :-) So in the worst case, we can revert it. Victor 2017-07-03 9:32 GMT+02:00 Masayuki YAMAMOTO <ma3yuki.8mamo10 at gmail.com>: > 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 PyHAVENATIVETLS 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. > PyThreadReInitTLS 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, > Masayuki > _> ________________________ > Python-Dev mailing list > Python-Dev at python.org > https://mail.python.org/mailman/listinfo/python-dev > Unsubscribe: > https://mail.python.org/mailman/options/python-dev/victor.stinner%40gmail.com >
Python-Dev mailing list Python-Dev at python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/victor.stinner%40gmail.com
- Previous message (by thread): [Python-Dev] Remove own implementation for thread-local storage
- Next message (by thread): [Python-Dev] Remove own implementation for thread-local storage
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]