[gambit-list] serializing continuations
Thomas Hafner
thomas at hafner.NL.EU.ORG
Thu Nov 2 09:38:57 EST 2006
Hello,
in the info pages for readtables there's an example how to serialize a
continuation. The continuation multiplies by 100, an it's captured
like this by the function suspend-and-die!:
...
(lambda ()
(* 100 (suspend-and-die!)))
...
I'd like to extend the example in a way, that the continuation shall
not do the total computation at once. Instead, it shall compute a
part, and serialize the remainder of the computation. The semantics
may look something like this:
...
(lambda ()
(* 20 (suspend-and-die-ext!
(* 5 (suspend-and-die-ext! 1)))))
...
It's not sufficient that suspend-and-die-ext! has just one more
(dummy) parameter than suspend-and-die!:
*** ERROR ... -- Thread is terminated
I guess that some more thread creation has to be added, because
thread-terminate! is called twice (indirectly by
suspend-and-die-ext!). Where? Can somebody help me extending the
example?
Regards
Thomas
More information about the Gambit-list
mailing list