Making sense of Stackless

Darrell darrell at dorb.com
Tue Feb 29 01:25:13 EST 2000


Still playing.

Was wondering how to simulate threads with out adding special calls.
This was one idea but it blows up.

def dispatch(frame, event, arg):
    caller=continuation.caller()
    caller.jump()

sys.settrace(dispatch)

If this worked, I'd put a list of continuations in the dispatch call.

Also a threading module in stackless would have to switch threads when an
I/O call blocks.


--Darrell







More information about the Python-list mailing list