[Stackless] Asyncronous IO (Was: Re: question about stackless)

Russ Cox rsc at plan9.bell-labs.com
Wed Jun 12 03:51:24 CEST 2002

It can be convenient to do I/O without being rescheduled.
I think it makes more sense not to have any special handling
of I/O built in, but rather to have a module that provides
files that automatically schedule as you described, via 
select or kqueue or whatever. 

You're right that you don't need a top-level event loop
if you have good threading support (e.g., stackless),
and that does make programs quite a bit easier to understand.

How I/O is implemented isn't really a feature of the
interpreter per se, but rather a design choice in writing
your own programs.  In many cases it's great to have read
and write routines that devolve transparently into select
so that you only need one OS thread.  But there are still
cases when you'd want different OS threads to handle I/O,
for example reading from disk files, which select doesn't

Stackless mailing list
Stackless at www.tismer.com

More information about the Stackless mailing list