Add comment about attachChild

This commit is contained in:
Patrik Nordwall 2012-09-11 09:28:05 +02:00
parent 14f66d9c05
commit 4b8a73cc7f

View file

@ -75,6 +75,10 @@ class RemoteRouteeProvider(nodes: Iterable[Address], _context: ActorContext, _re
IndexedSeq.empty[ActorRef] ++ (for (i 1 to nrOfInstances) yield {
val name = "c" + childNameCounter.incrementAndGet
val deploy = Deploy("", ConfigFactory.empty(), props.routerConfig, RemoteScope(nodeAddressIter.next))
// attachChild means that the provider will treat this call as if possibly done out of the wrong
// context and use RepointableActorRef instead of LocalActorRef. Seems like a slightly sub-optimal
// choice in a corner case (and hence not worth fixing).
context.asInstanceOf[ActorCell].attachChild(props.withDeploy(deploy), name, systemService = false)
})