Python Performance vs. C++ in a Complex System

Elliott Chapin echapin at sympatico.ca
Mon Apr 16 00:16:10 EDT 2001


I wonder if microthreads work like traditional Forth multitasking, which is
controlled roundrobin: Roughly speaking, PAUSE marks safe exit points, and
jumps to the next task if multitasking is on. Each task saves no more than
it really needs.
--

---------------------------------------------------------------

Elliott Chapin         http:// www3.sympatico.ca/echapin
"Aahz Maruch" <aahz at panix.com> wrote in message
news:9bd7gi$cq1$1 at panix3.panix.com...
> In article <yTnC6.671587$JT5.17930511 at news20.bellglobal.com>,
> Elliott Chapin <echapin at sympatico.ca> wrote:
> >
> >So how does Python do context switching, [anybody]?
>
> It depends on whether you use native Python threads or microthreads
> built on top of Stackless Python.  Python threads are built on top of
> OS-level threads, so the OS handles the context switch.  Microthreads
> are built on top of continuations in Stackless, and an essentially
> cooperative multi-tasker handles the context switches.
> --
>                       --- Aahz  <*>  (Copyright 2001 by aahz at pobox.com)
>
> Androgynous poly kinky vanilla queer het Pythonista
http://www.rahul.net/aahz/
> Hugs and backrubs -- I break Rule 6
>
> Why is this newsgroup different from all other newsgroups?





More information about the Python-list mailing list