0

所以如果我有一个看起来像这样的块:

def fileTree = project.fileTree("someDir/")
GPars.withPool(threads,exceptionHandler) {
  fileTree.eachParallel { File -> 
   //Load the file, transform the data and write it to a new file name. 
  } //End of eachParallel
}//End of withPool

什么时候所有文件都被写入、刷新并准备好在附加代码中使用?在End of eachParallel或 在End of withpool? ...或者是否需要特殊代码来管理这个?

4

1 回答 1

0

好吧,这取决于您的eachParallel实施,但应该在那里完成。

于 2016-01-12T21:05:59.930 回答