Stackless Platform Independence?

Christian Tismer tismer at tismer.com
Mon Mar 4 09:26:54 EST 2002


Frederic Giacometti wrote:

> 
> Aahz Maruch wrote:
> 
> 
>>>Just reverse the paradigm: have the python VM run in a single thread,
>>>using stackless microthreads for python multithreading, and run the C
>>>calls in a pool of threads.  This way: no lock is needed, since only
>>>one thread runs the VM, with the help of microthreads, and C calls run
>>>in other threads.
>>>
>>This doesn't make any sense unless you assume OS-level threads, and I
>>thought part of the point of Stackless was to avoid requiring OS-level
>>threads.
>>
> 
> More precisely, the point of stackless is to dispense from OS threads (and Python
> lock) overheads for running threaded Python bytecode.
> However, OS threads are still required to take charge of calls to blocking C
> function (usually from external C libraries) that one want to run asynchronously
> to the PVM; there is no turn around to this.


Makes pretty much sense to me.
Stackless can provide light-weight threads to all platforms.
There is no need to use OS threads unless you need it
for I/O.

ciao - chris

-- 
Christian Tismer             :^)   <mailto:tismer at tismer.com>
Mission Impossible 5oftware  :     Have a break! Take a ride on Python's
Kaunstr. 26                  :    *Starship* http://starship.python.net/
14163 Berlin                 :     PGP key -> http://wwwkeys.pgp.net/
PGP Fingerprint       E182 71C7 1A9D 66E9 9D15  D3CC D4D7 93E2 1FAE F6DF
      where do you want to jump today?   http://www.stackless.com/






More information about the Python-list mailing list