From 97f3e8050eebdc7da129c1dcf73665ce3ffbbfd5 Mon Sep 17 00:00:00 2001 From: Philipp Haller Date: Mon, 13 Nov 2006 16:18:31 +0000 Subject: Minor beautification of iterator example. --- docs/examples/actors/joins5.scala | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'docs') 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) { -- cgit v1.2.3