[Zope] Re: Unfair Linux Threads And Python Oh My
Marcus Collins
mcollins@sunesi.com
Wed, 26 Apr 2000 14:19:19 +0200
> -----Original Message-----
> From: Chris McDonough [mailto:chrism@digicool.com]
> Sent: 26 April 2000 06:08
> To: Evan Simpson
> Cc: Tony Rossignol; Tres Seaver; Marcus Collins; Bill Anderson;
> zope@zope.org
> Subject: Re: [Zope] Re: Unfair Linux Threads And Python Oh My
>
> Can a few folks with BSD/Solaris/HPUX/whateverotherthanLinux
> boxes try the script that Tony found and see what it does on
> their machines?
$ uname -mrs
FreeBSD 3.3-STABLE i386
The test script forks a single child and starts chowing cpu, but produces no
output on the terminal (it keeps looping in the while 1: pass).
Some observations:
If I replace the call to sys.stderr.write with a simple print, then I get a
single asterisk. Is sys.stderr.write() perhaps buffered?
If, instead of forking a child, I just let the thread take care of printing
(as in, e.g., http://www.python.org/doc/FAQ.html#4.86), then all works as
expected.
hth,
-- Marcus