Re: Thread Support in Libs [Was: creating an instance of a random number generator]

Chris Vale (cvale@netcom20.netcom.com)
Mon, 17 Apr 1995 23:17:25 GMT

>>>>> "Dan" == Dan Connolly <connolly@www18.cern.ch> writes:
In article <CONNOLLY.95Apr16235359@www18.cern.ch> connolly@www18.cern.ch (Dan Connolly) writes:

Dan> In article <9504071935.AA14413=guido@voorn.cwi.nl>
Dan> Guido.van.Rossum@cwi.nl writes: Python threads are now
Dan> supported on Solaris, IRIX, Windows NT, and probably OS/2
Dan> (and anything supporting pthreads). What support is missing
Dan> in your eyes?

Dan> Preemptive thread switching, even when running C callbacks.
Dan> This requires a lot of re-engineering. In fact, what you get
Dan> is more like Modula-3.

Dan> But right now, there are untold places in the python runtime
Dan> and libraries that can block indefinitely, no?

Dan> For example: can I do two http transfers simultaneously using
Dan> the httplib module? i.e. is the socket module
Dan> thread-friendly?

Yes, socketmodule is thread friendly. In fact using the FTP module I
can run up to about 8 transfers at once before I start to see
degradation ( on WinNT, on OS/2 the thread count is lower, say 5
transfers). If you look in the 'standard' distribution most of the C
code has been thread friendlied. Unfortuantly I cona't comment
directly on the http module, but the underlying socket code is OK.

Dan> Dan -- Daniel W. Connolly "We believe in the
Dan> interconnectedness of all things" Research Technical Staff,
Dan> MIT/W3C <connolly@w3.org>
Dan> http://www.w3.org/hypertext/WWW/People/Connolly

-- 
-----------------------------------------------------------------------------
Chris Vale                       | "Outside a dog, a book is mans best friend
cvale@netcom.com                 |  Inside a dog, it's too dark to read"
                                 |                     Groucho Marx
-----------------------------------------------------------------------------