Skip to content

Commit

Permalink
Fix memory leak issue in ZIOConcurrent (#688)
Browse files Browse the repository at this point in the history
* OnInterrupt added

* interruptFork
  • Loading branch information
vkorchik authored Feb 17, 2024
1 parent b49e9d2 commit 660c3b7
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ lazy val root = project
unusedCompileDependenciesFilter -= moduleFilter("org.scala-js", "scalajs-library")
)

val zioVersion = "2.0.16"
val zioVersion = "2.0.21"
val catsVersion = "2.9.0"
val catsEffectVersion = "3.4.8"
val catsMtlVersion = "1.3.0"
Expand Down
6 changes: 6 additions & 0 deletions zio-interop-cats/shared/src/main/scala/zio/interop/cats.scala
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,12 @@ private abstract class ZioConcurrent[R, E, E1]
},
leftFiber.id <> rightFiber.id
)
.onInterrupt(
leftFiber.interruptFork *>
rightFiber.interruptFork *>
leftFiber.await *>
rightFiber.await
)
}
}

Expand Down

0 comments on commit 660c3b7

Please sign in to comment.