On Saturday 06 February 2010 06:59:12 pm Nate Nystrom wrote:
> Hi Christoph,
>
> Yes, there is deadlock in this case because of the interaction between
> clocks and finish. The main activity (the one creating the clock) is
> also registered on the clock. Since there's no next or c.drop() in
> that activity, the asynced activities block on next waiting for the
> main activity. Because of the finish, the main activity is blocked
> waiting for the spawned activities to complete.
>
> Nate
>
Nate,
thanks for your prompt reply. This sounds like a reasonable explanation to me
(Can we add something like this to the language definition ?). But it lured me
into adding a c.drop() just before the statement
finish for (p in Place.places ) { .
This got me the following message.
<stdout rank="0">main: before ClockTest</stdout>
<stderr rank="0">Uncaught exception at place 0: x10.lang.ClockUseException:
clock use exception</stderr>
<stderr rank="0">x10.lang.ClockUseException: clock use exception</stderr>
Is this the error message I should have got in the previous case ? Means, I
should have received this message if the program weren't caught in a deadlock
just before ?
Anyway, dropping the finish from the code seems to be the (only ?) legal way
out of this. But how do I tell the program to wait until the spawned tasks
have finished ? Indeed, if I drop the finish without replacement,
<stdout rank="0">main: after ClockTest</stdout>
is printed before
<stdout rank="1">Before next</stdout>
<stdout rank="0">After next</stdout>
<stdout rank="1">After next</stdout> .
This is expected, but unwanted.
--
Mit freundlichen Grüßen / Kind regards
Dr. Christoph Pospiech
High Performance & Parallel Computing
Phone: +49-351 86269826
Mobile: +49-171-765 5871
E-Mail: [email protected]
-------------------------------------
IBM Deutschland GmbH
Vorsitzender des Aufsichtsrats: Erich Clementi
Geschäftsführung: Martin Jetter (Vorsitzender),
Reinhard Reschke, Christoph Grandpierre,
Klaus Lintelmann, Michael Diemer, Martina Koederitz
Sitz der Gesellschaft: Ehningen / Registergericht: Amtsgericht Stuttgart, HRB
14562 WEEE-Reg.-Nr. DE 99369940
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
X10-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/x10-users