Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parEvalMap resets stream cancellation #3487

Open
enlait opened this issue Oct 1, 2024 · 1 comment
Open

parEvalMap resets stream cancellation #3487

enlait opened this issue Oct 1, 2024 · 1 comment
Labels

Comments

@enlait
Copy link

enlait commented Oct 1, 2024

fs2 version 3.10.2

this codes prints Succeeded

Stream
  .eval(IO.canceled)
  .parEvalMap(2)(_ => IO.unit)
  .onFinalizeCase(c => IO.delay(println(c)))
  .compile.drain

while using evalMap instead, it is properly Canceled:

Stream
  .eval(IO.canceled)
  .evalMap(_ => IO.unit)
  .onFinalizeCase(c => IO.delay(println(c)))
  .compile.drain

expected behavior:
I would expect cancellation in both cases.

@enlait enlait added the bug label Oct 1, 2024
@enlait
Copy link
Author

enlait commented Oct 2, 2024

My bad, it may be a duplicate of #3311
Though example in that issue is somewhat convoluted

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant