[MLton] Transactions for ML

Daniel C. Wang danwang at CS.Princeton.EDU
Thu Apr 19 22:53:54 PDT 2007


Not to start a flame war about STM, but if you dig deep into the 
semantics it's not clear that it actually makes writing concurrent 
programs any easier. It probably makes writing *shared memory* based 
concurrent programs easier. However, if you're programming in SML and 
not something like C there are so many other ways to do concurrency 
better that STM is not an obvious win.

Also, my suspicion is that for type safe languages the GC will be the 
ultimate concurrency bottleneck. So if I were going to investigate 
anything it would be something like adding explicit regions to ML to 
manage the memory and control sharing between threads. For example
http://www.cs.washington.edu/homes/djg/papers/cycthreads.pdf

    *

      /Type-Safe Multithreading in Cyclone
      <http://www.cs.washington.edu/homes/djg/papers/cycthreads.pdf>/,
      Dan Grossman. ACM Workshop on Types in Language Design and
      Implementation, pages 13–25, New Orleans, LA, January 2003. ps
      <http://www.cs.washington.edu/homes/djg/papers/cycthreads.ps> pdf
      <http://www.cs.washington.edu/homes/djg/papers/cycthreads.pdf> dvi
      <http://www.cs.washington.edu/homes/djg/papers/cycthreads.dvi>

      /Formal development for supporting concurrency in Cyclone.
      Unfortunately, we have yet to implement it./





More information about the MLton mailing list