| Safe-for-Space Threads in Standard ML (1998) | |||||||||||||||
Abstract | |||||||||||||||
| Threads can easily be implemented using first-class continuations, but the straightforward approaches for doing so lead to space leaks, especially in a language with exceptions like Standard ML. We show how these space leaks arise, and give a new implementation for threads that is safe-for-space. 1 Introduction The ability to provide simple implementations of lightweight, concurrent threads is often cited as one of the great attractions of first-class continuations. We show that this task is not nearly as simple as previously thought, at least if one is concerned about space safety. Programming with threads is common in domains such as networking, operating systems, and user interfaces. Threads are not strictly necessary for such applications, but designing these systems with threads leads to an overall system structure that is much easier to understand and modify. Principles for programming with threads can be found in any undergraduate textbook on operating-system design. An excelle... | |||||||||||||||
Publication details | |||||||||||||||
| |||||||||||||||