On Fri, 22 Jul 2011 18:38:15 -0400, McAnany, Charles E
wrote:
Hi, all. So I'm getting the classic "concurrency noob" behavior from
this code:
shared int times;
int[] iterationRange = new int[2500];
foreach (pos, ref i; parallel(iterationRange)){
times++;
}
write
Hi, all. So I'm getting the classic "concurrency noob" behavior from this code:
shared int times;
int[] iterationRange = new int[2500];
foreach (pos, ref i; parallel(iterationRange)){
times++;
}
writeln(times);
}
Prints random numbers near 1,000.
Looking at the docu