[MLton] callcc and space use

Vesa Karvonen vesa.a.j.k at gmail.com
Tue Jan 22 13:22:42 PST 2008


On Jan 22, 2008 5:31 PM, Daniel Spoonhower <spoons at cs.cmu.edu> wrote:
> I've been using callcc/throw in some of my parallel work as a means to
> suspend and resume computation. [...]

Just curious, since you specifically mention using callcc to suspend
and resume computation (rather than to fork computation), I wonder
whether there is a reason to use MLton's callcc
(http://mlton.org/MLtonCont) rather than MLton's threads
(http://mlton.org/MLtonThread), which are expressive enough for
suspending and resuming computation.  I ask about this, because,
AFAIK, MLton's callcc and throw are implemented on top of MLton's
threads by copying the stack and performing thread switches.  IOW,
using just MLton's threads (i.e. switch) for suspend and resume would
likely be considerably more efficient.

At any rate, I'm very interested in seeing parallel stuff in MLton.

-Vesa Karvonen



More information about the MLton mailing list