fs2 icon indicating copy to clipboard operation
fs2 copied to clipboard

Reactive-streams interop is uncancelable

Open Jasper-M opened this issue 2 years ago • 3 comments

The implementation still uses an uncancelable async_ call which will hang on CE 3.5: https://github.com/typelevel/fs2/blob/9c523441c8f1770faafb36e01c893218162cdb72/reactive-streams/src/main/scala/fs2/interop/reactivestreams/StreamSubscriber.scala#L223

The java flow interop is fixed, but the fix hasn't been released yet. Since the reactive-streams interop seems to be deprecated in favor of the flow interop, perhaps just releasing the fixed flow interop is sufficient? Though I noticed that the compiler doesn't seem to actually show any deprecation warnings.

Jasper-M avatar Jul 17 '23 20:07 Jasper-M

Since the reactive-streams interop seems to be deprecated in favor of the flow interop,

Well, yes and no. reactive-streams is the only option available on JDK8, flow was introduced in JDK9.

Though I noticed that the compiler doesn't seem to actually show any deprecation warnings.

We implemented as a "soft" deprecation that only appears in scaladocs. This is because hard-deprecating would leave JDK8 users out in the cold.

armanbilge avatar Jul 17 '23 20:07 armanbilge

Ah ok that makes sense.

Jasper-M avatar Jul 17 '23 20:07 Jasper-M

Just to give a more concrete action for anyone hitting this issue: if you are on JDK 9+, please switch to the FS2 Flow interop and if necessary use the official Reactive Streams FlowAdapters.

There is no reason to use the FS2 Reactive Streams interop anymore unless you are stuck on JDK 8.


Edit: for the record, a PR to fix FS2 Reactive Streams interop is welcome, if anyone feels so inclined :)

armanbilge avatar Jan 24 '24 14:01 armanbilge