How can I use the parallel ParHashMap.map to when I want to apply a function to each of the elements in the ParHashMap?
Here is a complete example. The call to the map-function never returns:
import scala.collection.parallel.immutable.ParHashMap
object parTest extends Application {
def foo(a: Any) = .1
val U = ParHashMap[String, Double](("test",1))
println(U)
val V = U.map( entry => foo(entry) )
println(V)
}
Thank you very much!
Use
Apprather thanApplication(which is deprecated). I tested it with App and it works fine.