Skip to content

Commit

Permalink
added in code to check for task being cancelled
Browse files Browse the repository at this point in the history
  • Loading branch information
bbejeck committed Feb 13, 2012
1 parent 051eeed commit 68ad482
Showing 1 changed file with 5 additions and 3 deletions.
Expand Up @@ -77,10 +77,12 @@ public Void call() throws Exception {
private void findFiles(final File startDirectory, final FilenameFilter filenameFilter) {
File[] files = startDirectory.listFiles(filenameFilter);
for (File file : files) {
if (file.isDirectory()) {
findFiles(file, filenameFilter);
if (!fileTask.isCancelled()) {
if (file.isDirectory()) {
findFiles(file, filenameFilter);
}
fileLinkedBlockingQueue.offer(file);
}
fileLinkedBlockingQueue.offer(file);
}
}

Expand Down

0 comments on commit 68ad482

Please sign in to comment.