[Stackless] The case for Twisted

Joachim König-Baltes joachim.koenig-baltes at emesgarten.de
Mon Aug 13 11:34:58 CEST 2007

Tim Kientzle schrieb:
> In theory, most of these can be converted into channel
> operations by treating the channel as a mechanism for
> tasks to subscribe to certain events.  (E.g., you call
> a method asking to be notified of certain events; that
> method returns a channel endpoint that you can then wait
> on.)
I think it's not necessary to use an additional level of indirection
in the form of channels. Just switch to the top level task with
an eventList as parameter.

In this way, the toplevel task plays the role of a task "kernel"
which dispatches to the individual tasks.

The top level taks aka scheduler can then perform a central
select/poll/kqueue/... in the most efficient way (e.g. depending
on OS, availability off aio etc.)
> Ah, if only that were true.  ;-)  For example,
> select() is generally a poor choice for file operations; much
> better to use aio system calls whose completion
> status has to be polled separately.  But it is true that
> you need a central facility of some sort that can
> map application notification requests onto some set
> of OS facilities (network and timing requests onto
> select(), file requests onto aio calls, etc.).


Stackless mailing list
Stackless at stackless.com

More information about the Stackless mailing list