[Stackless] Stackless based replacement
arnarbi at gmail.com
Fri Oct 3 21:24:19 CEST 2008
On Fri, Oct 3, 2008 at 20:56, Larry Dickson <ldickson at cuttedge.com> wrote:
> Am I right, that your answer to (1) is that Tasklet L is the one with
> "event.loop(TRUE)" and that that is the call that continually checks
> readiness for other tasklets?
Yes, that is correct.
> The "elaborate handler when select comes out of the block" is really pretty
> trivial, and was done decades ago by Inmos - who recorded a bit-by-bit
> description of their absolutely robust implementation. They actually solved
> a tougher problem, which was to let you code a multi-way branch in a single
> process (not just select the winning process with one stimulus to each, as
> we have been discussing), and included timers too.
> Your implementation of time.sleep looks like it's interrupt-based, so I
> guess you have a fast clock on your motherboard, unless C select is coded
> pretty weirdly.
Just to be clear, it is not *mine*, it is from the CPython source.
> This particular kind of interrupts and locking code is not as hard as you
> think, because it only has to serialize the queue manipulation for something
> you completely control - the Stackless virtual machine. I did it in DOS ages
> ago, and the Inmos documentation exhaustively lists what is needed, which
> isn't much (currently the "Transterpreter" project works off that). It's
> your call, of course, but I think readiness queueing is much cleaner without
> requiring a timer poll loop.
I'd be interested to see an implementation :)
More information about the Stackless