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 3d17b76 commit 96f4aafCopy full SHA for 96f4aaf
shared/src/test/scala/CountdownLatch.scala renamed to shared/src/test/scala/examples/CountdownLatch.scala
@@ -1,4 +1,6 @@
1
-package gears.async
+package examples
2
+
3
+import gears.async.*
4
5
import scala.collection.mutable
6
@@ -7,7 +9,7 @@ class CountdownLatch(private var count: Int) extends Async.OriginalSource[Unit]:
7
9
val listeners = mutable.Set[Listener[Unit]]()
8
10
11
override def poll(l: Listener[Unit]) =
- if count == 0 then l.completeNow((), this)
12
+ if count == 0 then l.completeNow((), this) || true
13
else false
14
15
override def addListener(l: Listener[Unit]) = synchronized:
0 commit comments