I am migrating from Cats Effect 2 to 3 and since Blocker
is not available anymore I wonder how is it possible to run F
in the blocking execution context?
Previously, the following code was used
val blocker: Blocker = Blocker.liftExecutionContext(blockingEc)
blocker.blockOn(F)
According to the CE3 docs, blocking contexts is inside a Runtime and this field is private. There is a method Sync[F].blocking(f: => A)
, but I need an alternative one with the possibility to pass F[A] to the blocking context like Sync[F].blockingF(f: F[A])
.