global interpreter lock not working as it should
Armin Steinhoff
a-steinhoff at web.de
Thu Aug 1 12:41:52 EDT 2002
Michael Hudson <mwh at python.net> wrote in message news:<lklm7qgbc6.fsf at pc150.maths.bris.ac.uk>...
> a-steinhoff at web.de (Armin Steinhoff) writes:
>
> > The 'problem' is that Python threads are not fully comparable with
> > system level threads. Python threads are managed (scheduled) at
> > _interpreter level_!!
> >
> > The important difference is that Python threads can't use e.g.
> > blocking I/O calls ... a blocking I/O call used in a Python thread
> > will block the whole interprete!!.
>
> This is just not true.
Sorry ... your statement is simply wrong.
>From the thread docs ... section caveats:
> Not all built-in functions that may block waiting for I/O allow other threads >to run. (The most popular ones (time.sleep(), file.read(),
>select.select()) work as expected.)
Yes ... only the most 'popular' ones are working (because there is only ONE
system thread (or process) spent for the interpreter)
Cheers
Armin
>
> Cheers,
> M.
More information about the Python-list
mailing list