@willgu wrote:
Hi everyone. I was testing my stream and found the following phenomenon.
Source((0 until 100).zipWithIndex) .groupedWithin(10, 10 millisecond) .map { seq => seq.groupBy(x => x._1 % 2) .mapValues { v => println(s"doing stuff ${v.map(_._2)}") // <-- this won't print v.size } } .toMat(Sink.ignore)(Keep.both) .run()
However, if I change
mapValues
tomap
. It prints alright. Any idea why this might happen?
Posts: 3
Participants: 2