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
> [email protected]
> 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
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users

Reply via email to