Parallel file processing in Scala

后端 未结 6 687
被撕碎了的回忆
被撕碎了的回忆 2020-12-06 03:17

Suppose I need to process files in a given folder in parallel. In Java I would create a FolderReader thread to read file names from the folder and a pool of

6条回答
  •  -上瘾入骨i
    2020-12-06 03:53

    Depending on what you're doing, it may be as simple as

    for(file<-files.par){
       //process the file
    }
    

提交回复
热议问题