Stream.unit // number of elements is irrelevant, as long as there are any; does not reproduce on Stream.empty
.covary[IO]
.parEvalMap(2)(_ => IO.canceled)
.compile.drain
while it's not obvious what to hope for in relation to concurrently executing effects - whether they should also cancel or not - one would expect overall termination semantics to be the same across evalMap and parEvalMap. It is also difficult to reason how to work around such situation.
fs2 version 3.10.2
this code does not terminate:
while there is no issue with
evalMap
:even worse, adding
interruptAfter
afterparEvalMap
does not make the code terminate:it is not necessary for all effects to be cancelled, one is enough. This also hangs:
expected behavior:
while it's not obvious what to hope for in relation to concurrently executing effects - whether they should also cancel or not - one would expect overall termination semantics to be the same across
evalMap
andparEvalMap
. It is also difficult to reason how to work around such situation.