This is a clone of Kilim, which has some changes for supporting Erjang — a JVM-based Erlang VM.
Thanks to Sriram Srinivasan for making Kilim in the first place!
See Authoritative Kilim Site for lots of good material.
The original Kilim is now also hosted on GitHub here; eventually we want to make our kilim a proper clone of that version; but there is some work in doing that.The additions/changes are roughly:
untilHasMessage(long). Needed to implement ditto for Erjang.
task.kill(java.lang.Error ex)which makes
exbe eventually thrown inside the target Task [before it can send a message at least].
Task.checkKill()can be called periodically to check for this.
kilim.Statewhen only saving
kilim.Fiberhas three stacks now, one for State (sans pc and self), and separate stacks for
this(a.k.a. self), and
pc. For my Erjang performance tests, this speeds up the “ring problem” by almost a factor of two because it avoids a lot of allocations.
.classfiles. This feature is incomplete, but intention is that the weaver tool should accept a
-classpathargument so it can be run e.g. inside Eclipse. [I also have an eclipse builder in the making…]
Wishes for the future
kilim.Pausablesubclass / exception marker “
kilim.TaskUser” that makes the weaver pass in the fiber, but does not generate save/restore code. This is ideal for calling Erjang-runtime functions that needs access to the current process.