Skip to content

Commit

Permalink
Merge pull request #3157 from djspiewak/feature/hide-supervisor-api
Browse files Browse the repository at this point in the history
Suppress supervisor `checkRestart`
  • Loading branch information
djspiewak authored Sep 28, 2022
2 parents 6f0dea1 + 7bca9ac commit 18fb15d
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions std/shared/src/main/scala/cats/effect/std/Supervisor.scala
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,11 @@ object Supervisor {
* the termination policy
* - true - wait for the completion of the active fibers
* - false - cancel the active fibers
*
* @param checkRestart
* An optional function which will be applied to the outcome of the child fibers when they
* complete. If this function returns `true` for a given outcome, the child fiber will be
* restarted. Otherwise, it will be allowed to silently terminate.
*/
def apply[F[_]](
def apply[F[_]](await: Boolean)(implicit F: Concurrent[F]): Resource[F, Supervisor[F]] =
apply[F](await, None)(F)

private[std] def apply[F[_]](
await: Boolean,
checkRestart: Option[Outcome[F, Throwable, _] => Boolean] = None)(
implicit F: Concurrent[F]): Resource[F, Supervisor[F]] = {
Expand Down

0 comments on commit 18fb15d

Please sign in to comment.