Skip to content

Commit

Permalink
executeAsync
Browse files Browse the repository at this point in the history
Co-authored-by: Flavio Brasil <[email protected]>
  • Loading branch information
hearnadam and fwbrasil authored Nov 19, 2024
1 parent 1ff27e8 commit 949b664
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kyo-monix/shared/src/main/scala/kyo/Monix.scala
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ object Monix:
def get[A: Flat](task: Task[A])(using monix.execution.Scheduler, Frame): A < (Abort[Throwable] & Async) =
IO.Unsafe {
val p = Promise.Unsafe.init[Throwable, A]()
val cancelable = task.runAsync { (e: Either[Throwable, A]) =>
val cancelable = task.executeAsync.runAsync { (e: Either[Throwable, A]) =>
p.completeDiscard(Result.fromEither(e))
}
p.onInterrupt(_ => discard(cancelable.cancel()))
Expand Down

0 comments on commit 949b664

Please sign in to comment.