[MLton] thread model
Lukasz S Ziarek
lziarek@cs.purdue.edu
Wed, 02 Feb 2005 14:39:31 -0500
I would like to be able to at a particular scheduling point capture a
threads continuation. Then after further exectution of that thread, if
I deem necessary, "roll back" to the captured continuation. In the NJ
implementation of CML this would probably be done by capturing the
continuation at the scheduling point (the scheduler already uses callcc
so no extra work here), save it, then to restore the thread to the
continuation I have saved by placing the saved continuation on the
scheduling queue inplace of the current continuation for that thread.
The sceduler takes care of the rest (ignoring for now the heap etc).
With MLton's one shot continuations, is there a way to emulate this?
thanks
Luke