CleverCloud / pulsar4s

Idiomatic, typesafe, and reactive Scala client for Apache Pulsar
Apache License 2.0
228 stars 43 forks source link

Why not use `Async[F].fromCompletableFuture`? #485

Open buntec opened 1 year ago

buntec commented 1 year ago

Hi,

Browsing the Cats Effect module, I noticed the custom converter from CompletableFuture[T] to F[T]. Is there a reason not to use the built-in https://github.com/typelevel/cats-effect/blob/series/3.x/kernel/jvm/src/main/scala/cats/effect/kernel/AsyncPlatform.scala#L32? At first glance it seems to have better cancellation semantics.

Just curious!

Thanks, Christoph

Jasper-M commented 1 month ago

This issue has become a bit more serious since Cats Effect 3.5.0 came out and made async_ uncancelable. That means that all operations here are now uncancelable.