Removing one use-site of startsWatching
This commit is contained in:
parent
bf7befc690
commit
571d856f54
1 changed files with 5 additions and 3 deletions
|
|
@ -341,9 +341,11 @@ abstract class ActorModelSpec extends AkkaSpec {
|
|||
val cachedMessage = CountDownNStop(new CountDownLatch(num))
|
||||
val stopLatch = new CountDownLatch(num)
|
||||
val waitTime = (30 seconds).dilated.toMillis
|
||||
val boss = actorOf(Props(context ⇒ {
|
||||
case "run" ⇒ for (_ ← 1 to num) (context.self startsWatching context.actorOf(props)) ! cachedMessage
|
||||
case Terminated(child) ⇒ stopLatch.countDown()
|
||||
val boss = actorOf(Props(new Actor {
|
||||
def receive = {
|
||||
case "run" ⇒ for (_ ← 1 to num) (watch(context.actorOf(props))) ! cachedMessage
|
||||
case Terminated(child) ⇒ stopLatch.countDown()
|
||||
}
|
||||
}).withDispatcher(system.dispatcherFactory.newPinnedDispatcher("boss")))
|
||||
boss ! "run"
|
||||
try {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue