Home
General
Staff
Contact
Partners
Alumni
Research
Areas
Projects
Papers
Books
Reports
Awards
Teaching
Lectures
Exams
B.Theses
M.Theses
PhD Theses
Go Abroad
Misc
Talks
Library
Gallery
Links
Search
Webmaster
|
|
Coroutines for Java
Lukas Stadler
Welcome!
This page contains information about the experimental coroutine implementation for the HotSpot Java VM.
The implementation is part of the Da Vinci Machine Project, a larger effort to bring features to the JVM that help dynamic language implementations.
But coroutines aren't only useful for dynamic languages, they also have many advantages for Java programmers.
Please read the introductory pdf for a more in-depth overview and a bit of history.
|
Introduction, API, etc.:
Please take a look at the following document, it describes everything you need to know about coroutines and this implementation for Java:
Building
(Very short) build instructions:
-
Get mercurial and the mercurial forest extension.
-
Get the mlvm repository from http://hg.openjdk.java.net/mlvm/mlvm:
hg fclone http://hg.openjdk.java.net/mlvm/mlvm patches
-
Follow the instructions from the README.txt contained within the mlvm repo.
Make sure that the coro patch is enabled by adding "coro" or "coro-simple" (see below) to the set of guards: guards="buildable testable coro"
Pre-built binaries:
The build process can be very complex, so you can just download one of the following pre-built binaries:
-
Simplified version (coro-simple): this version does not allow for coroutine serialization and migration, but is generally more stable.
Coroutine VM SDK MacOS x64 - (product build) (debug build)
Coroutine VM SDK Linux x64 - (product build) (debug build)
-
Full version (coro): contains all features including serialization and migration, but is less stable that the simplified version.
Coroutine VM SDK Linux x64 - (product build) (debug build)
The maximum number of allocated stacks per thread (default: 100) can be configured via: -Dcoro.stacksPerThread=xxx.
Publications
-
Lukas Stadler:
Serializable Coroutines for the HotSpot™ Java Virtual Machine
Master's thesis, Johannes Kepler University Linz, February 2011
-
Lukas Stadler, Thomas Würthinger, Christian Wimmer:
Efficient Coroutines for the Java Platform
In Proceedings of the 8th International Conference on Principles and Practice of Programming in Java, pages 20–28. ACM Press, 2010.
-
Lukas Stadler, Christian Wimmer, Thomas Würthinger, Hanspeter Mössenböck, John Rose:
Lazy Continuations for Java Virtual Machines
In Proceedings of the 7th International Conference on Principles and Practice of Programming in Java, pages 143–152. ACM Press, 2009.
|