[MLton] Time-limiting a computation?

William Lovas wlovas@cs.cmu.edu
Fri, 24 Jun 2005 11:16:50 -0400


This is from Tom Murphy and William Lovas at CMU. We're participating in
the ICFP programming contest this year, and part of what we need to do is
to limit a computation to 5 seconds. (That is, compute better and better
answers to a problem, but definitely report one before 5 seconds is up.)

What's a robust way to do this with mlton? Can we safely use the signal
mechanism? Do we have to be careful about race conditions in that case?  

Tom and William