From 891df52ca058d6da074307a0a7c54548b74ac411 Mon Sep 17 00:00:00 2001 From: Kyri Petrou Date: Thu, 18 Apr 2024 00:42:01 +1000 Subject: [PATCH] Use `FiberRuntime#unsafe.addObserver` for bincompat with v2.1 --- zio-interop-cats/shared/src/main/scala/zio/interop/cats.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zio-interop-cats/shared/src/main/scala/zio/interop/cats.scala b/zio-interop-cats/shared/src/main/scala/zio/interop/cats.scala index ce5edb67..8a5e762c 100644 --- a/zio-interop-cats/shared/src/main/scala/zio/interop/cats.scala +++ b/zio-interop-cats/shared/src/main/scala/zio/interop/cats.scala @@ -431,12 +431,12 @@ private abstract class ZioConcurrent[R, E, E1] ZIO .async[R, E3, C]( { cb => - leftFiber.addObserver { _ => + leftFiber.unsafe.addObserver { _ => complete(leftFiber, rightFiber, leftWins, raceIndicator, cb) () }(Unsafe.unsafe) - rightFiber.addObserver { _ => + rightFiber.unsafe.addObserver { _ => complete(rightFiber, leftFiber, rightWins, raceIndicator, cb) () }(Unsafe.unsafe)