[Stackless] stacklessocket with threads, and stacklessfile

Edward Faulkner ef at alum.mit.edu
Thu Aug 9 01:37:02 CEST 2007


On 8/8/07, Tim Kientzle <tim at metaweb.com> wrote:
> Remember that select() is itself a blocking system call,
> so the I/O pump invokes it with a short timeout
> so that other tasklets get serviced.

If there are other runnable tasklets, just invoke select() with a
timeout of zero, and then call schedule().  If there are not other
runnable tasklets, invoke with no timeout (because there's nothing
else to do, so blocking is ok).  If there are tasklets that want to
wake up in the future, invoke select() with the appropriate timeout.

That's how my example works:
http://sweetbytes.net/stackless_io.html

-Ed

_______________________________________________
Stackless mailing list
Stackless at stackless.com
http://stackless.com/cgi-bin/mailman/listinfo/stackless



More information about the Stackless mailing list