I am looking at the example from the language spec (section15.4):
clocked finish {
clocked async {
phase("A", 1);
Clock.advanceAll();
phase("A", 2);
}
clocked async {
phase("B", 1);
Clock.advanceAll();
phase("B", 2);
}
}
As far as I understand, this is going to work as intended only if the launching
of activities follow a specific rule:
1. We enter the "clocked finish" block.
2. Both activities A and B are created and registered with the clock, but they
are not active yet.
3. Activities A and B become active and they proceed as we expect.
Otherwise it might be a problem: if activity A becomes active before B is
registered with the clock, then A may proceed with advanceAll(), because at the
point the clock does not know anything about B.
Could anybody confirm that my understanding is correct, and where in the spec
it explains what is the sequence of creating activities, making them active,
registering with clocks, etc. Looks to me that in the above example the
compiler has to do it properly based on the fact that two activities are
specified next to each other inside a block.
------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
X10-users mailing list
X10-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/x10-users