SML# Document Version 4.0.0
II Tutorials

Chapter 11 SML# feature: Multithread programming

Through the seamless and direct C interface, SML# supports multiple threads that run concurrently on multicore processors. SML# allows you to exploit two thread libraries directly in SML#: POSIX thread (Pthread) library, which is a part of operating systems; and MassiveThreads, a lightweight fine-grain thread library. In both libraries, you can create multiple threads in SML#, each of which executes a SML# routine and is scheduled to a CPU core by operating systems or the MassiveThreads’ thread scheduler. This chapter introduces multithread programming in SML#.