Permalink
Browse files

taskPool loops cannot be broken

  • Loading branch information...
1 parent c77b870 commit 75f292fffd0451572d46bfe46b31e51a17eaa7de @andralex andralex committed Feb 21, 2012
Showing with 8 additions and 5 deletions.
  1. +8 −5 rdmd.d
View
13 rdmd.d
@@ -503,15 +503,18 @@ bool anyNewerThan(in string[] files, in string file)
}
}
return false;
- } else {
- foreach (source; taskPool.parallel(files, 1))
+ }
+ else
+ {
+ bool result;
+ foreach (source; taskPool.parallel(files))
{
- if (isNewer(source, file))
+ if (!result && isNewer(source, file))
{
- return true;
+ result = true;
}
}
- return false;
+ return result;
}
}

0 comments on commit 75f292f

Please sign in to comment.