-
Notifications
You must be signed in to change notification settings - Fork 535
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
Dispatcher allocation can hang forever #2926
Comments
Can you please test if this is happening in 3.3.8 or maybe some other version too? It would be nice to find out if this is a bug for some time (possibly since the beginning) or a regression in the latest release. Thanks! |
On Scastie I tested 3.0, 3.1, 3.2, 3.3.0, 3.3.9 |
Reminds me of scala/bug#9076. |
Yup, pretty sure it's this problem:
|
It fails on 2.13.8. Also, originally it hung up in large project combined with other (Un)fortunately, minimal example within sbt project works as expected. |
It's not import cats.effect.std.Dispatcher
import cats.effect.{Async, IO, Resource}
import cats.effect.unsafe.implicits.global
println(1)
IO.println("hello").unsafeRunSync()
Dispatcher[IO].map { _ =>
println(2)
}.allocated.unsafeRunSync()
println(3)
Dispatcher[IO].map { _ =>
println(4)
}.allocated.unsafeRunSync() |
Is there any way we can reproduce this using a |
Probably can be 'fixed' by using the same implementation for IOApp and unsafeRunXYZ. Current situation of completely different implementations for seems to be identical tasks is weird. |
How so? |
Closing this for now. We really need a
We do, sort of. All the |
cats-effect 3.3.9
In my project, second unsafeRunSync always hangs. When reproducing on Scastie, it either passes or hangs on first unsafeRunSync.
https://scastie.scala-lang.org/65NZvvNKQcGfd8okMNNQMA
The text was updated successfully, but these errors were encountered: