diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/examples/actors/counter.scala | 11 | ||||
-rw-r--r-- | docs/examples/actors/customer.scala | 20 |
2 files changed, 18 insertions, 13 deletions
diff --git a/docs/examples/actors/counter.scala b/docs/examples/actors/counter.scala index 8578199bf5..99a616afb2 100644 --- a/docs/examples/actors/counter.scala +++ b/docs/examples/actors/counter.scala @@ -1,9 +1,12 @@ +/** + * @author Philipp Haller <philipp.haller@epfl.ch> + * + */ + +package examples.actors import scala.actors.multi.Pid -import actors.distributed.RemoteActor -import actors.distributed.TCP -import actors.distributed.TcpNode -import actors.distributed.TcpService +import scala.actors.distributed.{RemoteActor,TCP,TcpNode,TcpService} abstract class CounterMessage case class Incr() extends CounterMessage diff --git a/docs/examples/actors/customer.scala b/docs/examples/actors/customer.scala index 64453aee16..80c2664130 100644 --- a/docs/examples/actors/customer.scala +++ b/docs/examples/actors/customer.scala @@ -1,16 +1,18 @@ /** - @author Philipp Haller <philipp.haller@epfl.ch> - - This shows "customer passing" for implementing - recursive algorithms using actors. + * @author Philipp Haller <philipp.haller@epfl.ch> + * + * This shows "customer passing" for implementing + * recursive algorithms using actors. */ -import scala.actors._; -import scala.actors.single._; +package examples.actors + +import scala.actors._ +import scala.actors.single._ -abstract class FactorialMessage; -case class Factorial(n: int, resTo: Actor) extends FactorialMessage; -case class Value(n: int) extends FactorialMessage; +abstract class FactorialMessage +case class Factorial(n: int, resTo: Actor) extends FactorialMessage +case class Value(n: int) extends FactorialMessage class FactorialProcess extends Actor { override def run: unit = { |