On 18 April 2012 01:04, Safwan Khan <[email protected]> wrote:
> I’m a very newbie in javaflow.
Such questions belong on the Commons User list, not the developer list.
Please subscribe to it and ask there.
> Consider the following basic example:
> class MyRunnable implements Runnable {
> public void run() {
> System.out.println("started!");
> for( int i=0; i<10; i++ )
> echo(i);
> }
> private void echo(int x) {
> System.out.println(x);
> Continuation.suspend();
> }
> }
>
> Continuation c = Continuation.startWith(new MyRunnable());
> Continuation d = Continuation.continueWith(c);
> Continuation e = Continuation.continueWith(d);
> Continuation f = Continuation.continueWith(d);
> if (e.equals(f)) System.out.println("They are equal!");
> else System.out.println("They are not equal!");
>
>
> Both continuation e and f starts with same check point (d) and captures the
> same stacks and also both of them print 1. Then still why “They are not
> equal!”? (program gives this output). Can someone please explain it to me?
>
> Thanks,
> Sainan
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]