diff options
author | Philipp Haller <hallerp@gmail.com> | 2006-11-13 16:18:31 +0000 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2006-11-13 16:18:31 +0000 |
commit | 97f3e8050eebdc7da129c1dcf73665ce3ffbbfd5 (patch) | |
tree | 2359c26d669ea127853770b15dac2d2e50e963f9 /docs/examples | |
parent | 1a98bd7b476138c991c30c5bfa071af5fe539385 (diff) | |
download | scala-97f3e8050eebdc7da129c1dcf73665ce3ffbbfd5.tar.gz scala-97f3e8050eebdc7da129c1dcf73665ce3ffbbfd5.tar.bz2 scala-97f3e8050eebdc7da129c1dcf73665ce3ffbbfd5.zip |
Minor beautification of iterator example.
Diffstat (limited to 'docs/examples')
-rw-r--r-- | docs/examples/actors/joins5.scala | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/docs/examples/actors/joins5.scala b/docs/examples/actors/joins5.scala index 44faa4ed53..0a958bc768 100644 --- a/docs/examples/actors/joins5.scala +++ b/docs/examples/actors/joins5.scala @@ -11,6 +11,9 @@ abstract class Producer[T] { /** A label for an undefined state of the iterators. */ private val Undefined = new Object + /** A signal to stop the coordinator. */ + private val Stop = new Object + protected def produce(x: T): unit = { coordinator ! Some(x) receive { case Next => } @@ -34,8 +37,6 @@ abstract class Producer[T] { } } - case object Stop - private val coordinator: Actor = actor { var continue = true while (continue) { |