add Continuations test

This commit is contained in:
Joel Dice 2009-05-16 02:01:07 -06:00
parent 57cec2d068
commit 06fd492b1a

View File

@ -0,0 +1,19 @@
package extra;
import static avian.Continuations.callWithCurrentContinuation;
import avian.CallbackReceiver;
import avian.Callback;
public class Continuations {
public static void main(String[] args) throws Exception {
System.out.println
("result: " +
callWithCurrentContinuation(new CallbackReceiver<Integer>() {
public Integer receive(Callback<Integer> continuation) {
continuation.handleResult(42);
throw new RuntimeException();
}
}));
}
}