Coroutines for the Java Platform
Coroutines are an elegant and efficient implementation construct for numerous algorithmic problems. As more and more languages are implemented on top of the Java Virtual Machine, many of which provide coroutine-like language features, the need for a coroutine implementation has emerged. We present an approach to coroutine implementation that efficiently handles a large range of workloads. It imposes no overhead for applications that do not use coroutines and performs well for applications that do. We have implemented our approach for the Java HotSpot Virtual Machine as part of the MLVM project.