i just pushed a demo of using kilim with the java 9 JShell REPL to my kilim 2.0 repo
jshell> import kilim.*;
jshell> Mailbox<Integer> mb = new Mailbox<>();
mb ==> id:729803618 numMsgs:0
jshell> Task.fork(() -> { for (int ii=0; ii < 5; ii++) { Task.sleep(1000); mb.put(ii); } })
$39 ==> 24(running=true,pr=null)
jshell> for (Integer val=0; val != null;) System.out.println(val = mb.getb(2000));
0
1
2
3
4
null
this uses an execution provider to call the kilim runtime weaver on the bytecode generated by the jshell compiler. if you're integrating this into an existing codebase, you'll need the provider file in META-INF as well as the source code
works with java 9, 10, and 11
i aspire to integrate this into kilim proper, but as kilim needs to build with java 8 (or even 7) i haven't decided how to go about it
kilim 2.0 is currently compatible with java 7, 8, 9, 10, and 11, the single-file source code launcher, and the JShell REPL