[Swift-user] Re: Swift app question

Jonathan Monette jon.monette at gmail.com
Wed Sep 8 21:28:35 CDT 2010



This is what I meant.

foreach y in years
{
     Month m1<"month1.txt">;
     Month m2<"month2.txt">;

     Year x = calculate( m1, m2 );
}

I know that threads will be created and each iteration for the foreach 
loop will run in parallel.  What I am trying to understand is when is 
the calculate app executed.  This is a very dumbed down example but I 
want to know will x be mapped to the output of calculate once m1 and m2 
are closed or is there a "barrier" that blocks until all threads have 
finished mapping m1 and m2 before the apps are run in parallel?

On 9/8/10 9:21 PM, Mihael Hategan wrote:
> foreach y in years
> >  >  {
> >  >            Month m1<  "month1.txt">;
> >  >            Month m2<"month2.txt">;
> >  >  
> >  >            Year y = calculate( m1, m2 );
> >  >  }

-- 
Jon

Computers are incredibly fast, accurate, and stupid. Human beings are incredibly slow, inaccurate, and brilliant. Together they are powerful beyond imagination.
- Albert Einstein




More information about the Swift-user mailing list