Avinash Malik <ama...@scss.tcd.ie> wrote on 10/11/2011 08:57:01 AM:
>
> I have an application with this code:
>
> for(i in 1..1000){
> async at (here){
> //do a lot of things
> }
> }
>
> This code works fine.
>
> But when I change it to something like this...
>
> for(i in 1...1000){
> async at(Place.FIRST_PLACE){
> //do the same thing as above
> }
> }
>
> The code blocks and hangs forever. here == Place.FIRST_PLACE
> gives true, because I got only one place (Place(0)) in the
> system. Why doesn't Place.FIRST_PLACE work? Also, I have noticed
> that here.next() does not work, and behaves similarly to
> Place.FIRST_PLACE. Does here.next() not use a circular ring so to
> speak so that when there is only one place in the system,
> here.next(i) should just give place(0)? What are the semantics of
> here.next(i)?
>
> Some information about my setup:
>
> 1.) x10c version 2.2.1
> Polyglot compiler toolkit version 3.2.0 (2010-06-03 19:23:58)
>
> 2.) I am using svn with the update r23057.
>
Hi,
It should. here.next() should also work. Places are arranged in a
circular ring. here.next(i) is the same as calling here.next().next
()....next() (with i calls to next).
I'm guessing the problem might be that you are missing a finish. In
the snippet of code above, there isn't a finish, so the asyncs may be
running longer than you expected.
You might also try dropping the for loop down to 1..10 or something
small to try to see if that matters.
--dave
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure contains a
definitive record of customers, application performance, security
threats, fraudulent activity and more. Splunk takes this data and makes
sense of it. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users