I'm trying to map elements of a list and print some logs about the progress. But when I parallelise list, my stdout logs just stop appearing.
Why are they gone? Shouldn't the stdout
of all threads go to the same place?
> List(1,2,3,4).map(println(_))
1
2
3
4
res1: List[Unit] = List((), (), (), ())
> List(1,2,3,4).par.map(println(_))
res2: scala.collection.parallel.immutable.ParSeq[Unit] = ParVector((), (), (), ())
Looks weird. Am I missing something here?
I'm doing it in Databricks, if that makes any difference.