We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
notify
1 parent c1125ad commit ae319faCopy full SHA for ae319fa
src/main/scala/org/learningconcurrency/exercises/ch2/ex6.scala
@@ -13,8 +13,7 @@ object Ex6 extends App {
13
14
def getWait():T = this.synchronized {
15
while (syncQueue.isEmpty) {
16
- this.notify
17
- this.wait
+ this.wait()
18
}
19
20
val x = syncQueue.dequeue
@@ -47,7 +46,7 @@ object Ex6 extends App {
47
46
val consumer = thread {
48
var x = -1
49
while(x < 14) {
50
- x = syncVar.getWait
+ x = syncVar.getWait()
51
log(s"get: $x")
52
53
0 commit comments