KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I know about the parallel collections in Scala. They are handy! However, I would like to iterate over the lines of a file that is too large for memory in parallel. I could create threads and set up a lock over a Scanner, for example, but it would be great if I could run code such as: Source.fromFile(path).getLines.par foreach { line => Unfortunately, however error: value par is not a member of Iterator[String] What is the easiest way to accomplish some parallelism here? For now, I will read in somes lines and handle them in parallel.
Tags (comma-separated)
Save Edits
Cancel