Groovy GPAR并行写入,何时写入所有文件?

Groovy GPAR并行写入,何时写入所有文件?,groovy,gradle,gpars,Groovy,Gradle,Gpars,如果我有一个块,看起来像: 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 wi

如果我有一个块,看起来像:

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

在什么时候所有的文件都被写入、刷新并准备好在其他代码中使用?在每个并行的
结尾处或在withpool的
结尾处
。。。或者需要特殊的代码来管理它吗?

这取决于您的
每个并行的
实现,但它应该在那里完成。

这将是默认的实现。很抱歉造成混淆。我的意思是,您必须注意在每个并行块中写入/刷新文件