[Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements (original) (raw)
Greg Stein gstein@lyra.org
Thu, 17 Aug 2000 16:41:37 -0700
- Previous message: [Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements
- Next message: [Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Wed, Aug 16, 2000 at 11:34:12PM -0400, Tim Peters wrote:
... So one of two things can be done:
1. Bite the bullet and do it correctly. For example, maintain a static dict mapping the native pthreadself() return value to Python ints, and return the latter as Python's thread.getident() value. Much better would to implement a x-platform thread-local storage abstraction, and use that to hold a Python-int ident value. 2. Continue in the tradition already established , and #ifdef the snot out of it for Monterey. In favor of #2, the code is already so hosed that making it hosier won't be a significant relative increase in its inherent hosiness.
The x-plat thread-local storage idea is the best thing to do. That will be needed for some of the free-threading work in Python.
IOW, an x-plat TLS is going to be done at some point. If you need it now, then please do it now. That will help us immeasurably in the long run.
Cheers, -g
-- Greg Stein, http://www.lyra.org/
- Previous message: [Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements
- Next message: [Python-Dev] pthreads question: typedef ??? pthread_t and hacky return statements
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]