Stackless Platform Independence?
cbbrowne at acm.org
Tue Mar 5 18:54:25 CET 2002
The world rejoiced as Paul Rubin <phr-n2002a at nightsong.com> wrote:
> Christian Tismer <tismer at tismer.com> writes:
>> 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.
> Do you think it's feasible to modify Python to use non-blocking i/o
> everywhere, and then simulate blocking in Stackless? I.e. when a
> microthread does an i/o operation, Python would start the operation
> asynchronously, and the Stackless microthread scheduler would block
> the microthread til the i/o operation actually completes (detected
> using select or SIGIO).
That would indeed be rather cool; The Problem would be that this would
lose platform independence a bit further still.
There is a POSIX "aio" API; it is not uniformly implemented, and use
of it would almost certainly dictate a fair bit of OS specificity,
rather moreso than seems involved in "Stacklessness."
See <http://www.kegel.com/c10k.html> for more details just on what's
going on on the Linux side of things...
(concatenate 'string "cbbrowne" "@canada.com")
Time flies like an arrow, fruit flies like a banana.
More information about the Python-list