What are your thoughts on this sample:
//> using scala "3.5.1"
//> using dep "org.typelevel::cats-effect:3.5.4"
//> using dep "org.typelevel::cats-effect-cps:0.4.0"
import cats.effect.*
import cats.effect.cps.*
object Main extends IOApp.Simple:
def run = async[IO]:
try
IO.canceled.await
finally
println("Finalizing!")
The finalizer doesn't get invoked, and unfortunately, I find the sample counter-intuitive.
What are your thoughts on this sample:
The finalizer doesn't get invoked, and unfortunately, I find the sample counter-intuitive.