diff --git a/core/src/main/scala/ox/control.scala b/core/src/main/scala/ox/control.scala index c15f97b4..0bf92a6e 100644 --- a/core/src/main/scala/ox/control.scala +++ b/core/src/main/scala/ox/control.scala @@ -2,21 +2,21 @@ package ox import java.util.concurrent.locks.LockSupport -inline def forever(f: => Unit): Nothing = +inline def forever(inline f: Unit): Nothing = while true do f throw new RuntimeException("can't get here") /** Repeat evaluating `f` while it evaluates to `true`. */ -inline def repeatWhile(f: => Boolean): Unit = +inline def repeatWhile(inline f: Boolean): Unit = var loop = true while loop do loop = f /** Repeat evaluating `f` until it evaluates to `true`. */ -inline def repeatUntil(f: => Boolean): Unit = +inline def repeatUntil(inline f: Boolean): Unit = var loop = true while loop do loop = !f -inline def uninterruptible[T](f: => T): T = +inline def uninterruptible[T](inline f: T): T = scoped { val t = fork(f)