OK, I simplified the code a bit (I didn't need 2 inner clocked finishes), and 
submitted as an issue.

Interestingly, I found that the managed X10 to produce the expected output for 
this instance.

Thanks,
Tomofumi Yuki

----- Original Message -----
> From: "Vijay Saraswat" <vi...@saraswat.org>
> To: x10-users@lists.sourceforge.net
> Sent: Thursday, December 4, 2014 2:58:49 PM
> Subject: Re: [X10-users] Nested Implicit Clock Behavior
> 
> Yes, you are correct. Could you file this as a bug...?
> 
> Thanks!
> 
> Best,
> Vijay
> On 12/4/14, 4:32 AM, Tomofumi Yuki wrote:
> > Hi again,
> >
> > Thank you for your quick feedback. I did test the same code again with
> > 2.5.1 and submitted a bug report. In fact, I had a question about a more
> > complicated case before I encountered the bug earlier.
> >
> > With the following code:
> >
> > import x10.io.Console;
> >
> > class Test1 {
> >    public static def main(Rail[String]) {
> >       var x: Long = -1;
> >
> >       clocked finish {
> >          clocked async {
> >             clocked finish {
> >                Clock.advanceAll();
> >                Clock.advanceAll();
> >                x= 1;
> >             }
> >          }
> >          clocked async {
> >             clocked finish {
> >                Clock.advanceAll();
> >                Clock.advanceAll();
> >                Clock.advanceAll();
> >                x= 0;
> >             }
> >          }
> >          Clock.advanceAll();
> >          x = 3;
> >       }
> >           
> >       Console.OUT.println("x="+x);
> >    }
> > }
> >
> > I get the following output:
> >
> > $x10c++ Test1.x10 -o Test1; ./Test1
> > x=0
> >
> > However, I expect x=3 as output.
> >
> > The manual mentions that the inner clocked finish operates within a single
> > phase of the outer one. Therefore the last advance should halt the primary
> > activity until activities for both clocked asyncs terminate, since all
> > other calls to Clock.advanceAll is inside another clocked finish.
> >
> > Is my interpretation correct?
> >
> > Thanks,
> > Tomofumi Yuki
> >
> > ------------------------------------------------------------------------------
> > Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> > from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> > with Interactivity, Sharing, Native Excel Exports, App Integration & more
> > Get technology previously reserved for billion-dollar corporations, FREE
> > http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> > _______________________________________________
> > X10-users mailing list
> > X10-users@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/x10-users
> >
> 
> 
> ------------------------------------------------------------------------------
> Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
> from Actuate! Instantly Supercharge Your Business Reports and Dashboards
> with Interactivity, Sharing, Native Excel Exports, App Integration & more
> Get technology previously reserved for billion-dollar corporations, FREE
> http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
> _______________________________________________
> X10-users mailing list
> X10-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/x10-users
> 

------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to