Skip to content

Commit

Permalink
Merge pull request #2114 from djspiewak/feature/reset-runtime
Browse files Browse the repository at this point in the history
Added private functions for resetting the global runtime
  • Loading branch information
djspiewak authored Jul 12, 2021
2 parents 983beae + 6acd190 commit 5c9df79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ private[unsafe] abstract class IORuntimeCompanionPlatform { this: IORuntime.type
_global = global
}

private[effect] def resetGlobal(): Unit =
_global = null

lazy val global: IORuntime = {
if (_global == null) {
installGlobal {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ private[unsafe] abstract class IORuntimeCompanionPlatform { this: IORuntime.type
_global = global
}

private[effect] def resetGlobal(): Unit =
_global = null

lazy val global: IORuntime = {
if (_global == null) {
installGlobal {
Expand Down

0 comments on commit 5c9df79

Please sign in to comment.