add test for “unorderly” shutdown of ActorSystem by PoisonPill
- uncovered nasty endless loop bug wrt. dead letters and a dead listener - fixing that bug removed the MainBusReaper (sigh) - also fix compilation of tutorial-first, but that REALLY needs to be changed not to create RoutedActorRef using new!
This commit is contained in:
parent
829c67f60c
commit
eeca88d674
9 changed files with 35 additions and 36 deletions
|
|
@ -6,6 +6,7 @@ package akka.tutorial.first.scala
|
|||
import java.util.concurrent.CountDownLatch
|
||||
import akka.routing.{ RoutedActorRef, LocalConnectionManager, RoundRobinRouter, RoutedProps }
|
||||
import akka.actor.{ ActorSystemImpl, Actor, ActorSystem }
|
||||
import akka.actor.InternalActorRef
|
||||
|
||||
object Pi extends App {
|
||||
|
||||
|
|
@ -55,8 +56,9 @@ object Pi extends App {
|
|||
val workers = Vector.fill(nrOfWorkers)(system.actorOf[Worker])
|
||||
|
||||
// wrap them with a load-balancing router
|
||||
// FIXME REALLY this needs to use context to create the child!
|
||||
val props = RoutedProps(routerFactory = () ⇒ new RoundRobinRouter, connectionManager = new LocalConnectionManager(workers))
|
||||
val router = new RoutedActorRef(system, props, self, "pi")
|
||||
val router = new RoutedActorRef(system, props, self.asInstanceOf[InternalActorRef], "pi")
|
||||
|
||||
// message handler
|
||||
def receive = {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue