diff --git a/library/src/dotty/runtime/LazyVals.scala b/library/src/dotty/runtime/LazyVals.scala index 2c06a5dd8f05..b2240c86036d 100644 --- a/library/src/dotty/runtime/LazyVals.scala +++ b/library/src/dotty/runtime/LazyVals.scala @@ -67,7 +67,8 @@ object LazyVals { else if (state == 2) { val monitor = getMonitor(t, ord) monitor.synchronized { - monitor.wait() + if (STATE(get(t, offset), ord) == 2) // make sure notification did not happen yet. + monitor.wait() } } else retry = false