We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ce062c8 commit a873a86Copy full SHA for a873a86
tests/run/lazy-impl.scala
@@ -32,7 +32,7 @@
32
* if CAS(_x, null, Evaluating) then
33
* var result = rhs
34
* // if result == null then result == NULL
35
- * if !CAS(x, Evaluating, result) then
+ * if !CAS(_x, Evaluating, result) then
36
* val lock = _x.asInstanceOf[Waiting]
37
* _x = result
38
* lock.release(result)
@@ -60,7 +60,7 @@
60
* notifyAll()
61
*
62
* def awaitRelease(): AnyRef = synchronized:
63
- * if !done then wait()
+ * while !done do wait()
64
* result
65
66
* Note 2: The code assumes that the getter result type `A` is disjoint from the type
@@ -189,7 +189,7 @@ class Waiting extends LazyControl {
189
}
190
191
def awaitRelease(): AnyRef = synchronized {
192
- if (!done) wait()
+ while (!done) wait()
193
result
194
195
0 commit comments