Implementing threads in Standard ML

  • Peter Lee
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 1129)


This tutorial explores the well-known problem of how to implement concurrent threads of control in Standard ML, by using the extension of first-class continuations. Particular attention is paid to the proper treatment of exceptions and avoidance of storage leaks.


Exception Handler Main Thread Child Process Current Thread Ready Queue 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Abelson, H. Sussman, G. J., and Sussman, J.: Structure and Interpretation of Computer Programs. MIT Press (1985).Google Scholar
  2. 2.
    Appel, A. W. and MacQueen, D. B.: A Standard ML compiler. Proceedings of the Conference on Functional Programming Languages and Computer Architecture, Lecture Notes in Computer Science 274, Springer-Verlag, 301–324 (1987).Google Scholar
  3. 3.
    Bershad, B., Savage, S., Pardyak, P., Sirer, E. G, Becker, D., Fiuczynski, M., Chambers, C., and Eggers, S.: Extensibility, safety and performance in the SPIN operating system. Proceedings of the 1995 Symposium on Operating System Principles, 267–284 (December 1995).Google Scholar
  4. 4.
    Biagioni, E., Harper, R., and Lee, P. Signatures for a protocol stack: a systems application of Standard ML. Proceedings of the 1994 ACM Conference on Lisp and Functional Programming, Orlando (June 1994).Google Scholar
  5. 5.
    Birrell, A. D.: An Introduction to Programming with Threads. Technical Report 35, DEC Systems Research Center (January 1989).Google Scholar
  6. 6.
    Cooper, E. C. and Morrisett, J. G.: Adding Threads to Standard ML. Technical Report CMU-CS-90-186, School of Computer Science, Carnegie Mellon University (December 1990).Google Scholar
  7. 7.
    Haynes, C. T., Friedman, D. P., and Wand, M.: Obtaining coroutines with continuations. Computer Languages, 11(3–4), 143–53 (1986).Google Scholar
  8. 8.
    Milner, R., Tofte, M., and Harper, R.: The Definition of Standard ML. MIT Press, Cambridge, Massachusetts (1990).Google Scholar
  9. 9.
    Reppy, J. H.: CML: a higher-order concurrent language. ACM SIGPLAN '91 Conference on Programming Language Design and Implementation, Toronto, 293–305 (June 1991).Google Scholar
  10. 10.
    Springer, G., Friedman, D. P.: Scheme and the Art of Programming. McGraw-Hill, New York (1989).Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 1996

Authors and Affiliations

  • Peter Lee
    • 1
  1. 1.Carnegie Mellon UniversityPittsburghUSA

Personalised recommendations