From 923b88e8adef2f66b43e551fa4a0a1bbae5af7ff Mon Sep 17 00:00:00 2001 From: Ivan Topolnak Date: Wed, 7 Aug 2013 19:06:33 -0300 Subject: upgrading to akka 2.2 --- kamon-core/src/main/scala/test/PingPong.scala | 34 +++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 kamon-core/src/main/scala/test/PingPong.scala (limited to 'kamon-core/src/main/scala/test/PingPong.scala') diff --git a/kamon-core/src/main/scala/test/PingPong.scala b/kamon-core/src/main/scala/test/PingPong.scala new file mode 100644 index 00000000..f9d6869c --- /dev/null +++ b/kamon-core/src/main/scala/test/PingPong.scala @@ -0,0 +1,34 @@ +package test + +import akka.actor.{Props, Actor, ActorSystem} + +object PingPong extends App { + + val as = ActorSystem("ping-pong") + + val pinger = as.actorOf(Props[Pinger]) + val ponger = as.actorOf(Props[Ponger]) + + pinger.tell(Pong, ponger) + + + Thread.sleep(30000) + as.shutdown() + + +} + +case object Ping +case object Pong + +class Pinger extends Actor { + def receive = { + case Pong => sender ! Ping + } +} + +class Ponger extends Actor { + def receive = { + case Ping => sender ! Pong + } +} -- cgit v1.2.3