[Swift-user] Re: Swift app question
Mihael Hategan
hategan at mcs.anl.gov
Wed Sep 8 19:51:15 CDT 2010
On Wed, 2010-09-08 at 18:45 -0500, Jonathan Monette wrote:
> Hello,
> This is probably a simple question but when are app functions
> executed? Take a look at this psuedocode.
>
>
> foreach y in years
> {
> Month m1< "month1.txt">;
> Month m2 <"month2.txt">;
>
> Year y = calculate( m1, m2 );
> }
>
> When will the app "calculate" be executed? Will it execute as soon as
> m1 and m2 for a given iteration are mapped or will it wait till each
> thread has mapped its own m1 and m2 and execute the apps all together.
Is the use of y twice (once in the foreach and once for the result of
calculate()) accidental?
Mihael
More information about the Swift-user
mailing list