[Python-Dev] Should Python #define _POSIX_THREADS?

Thomas Wouters thomas@xs4all.net
Thu, 5 Apr 2001 19:53:39 +0200


On Thu, Apr 05, 2001 at 02:23:26AM -0400, Tim Peters wrote:

> [Jason Tishler, passing on someone's objection to Python #define'ing
>  _POSIX_THREADS sometimes]

> Right or wrong, it's too late to change this for 2.1 (IMO).  Thread support
> across platforms is very touchy, because so poorly standardized and
> implemented across vendors, and fiddling with *any* of that support code is
> very dangerous.  Can you swear that Python never #define'ing _POSIX_THREADS
> on its own won't break threading on some other platform?  If not, changing it
> needs *lots* of lead time for x-platform testing.

We could define _POSIX_THREADS only if it isn't already defined. Or better
yet, defined PY_POSIX_THREADS, have the Python source itself just trigger
off of that, and #define _POSIX_THREADS somewhere in pyport.h,
PY_POSIX_THREADS is defined and _POSIX_THREADS is not.

-- 
Thomas Wouters <thomas@xs4all.net>

Hi! I'm a .signature virus! copy me into your .signature file to help me spread!