=act #17087 PromiseActorRef (ask pattern) must send right Terminated()
This commit is contained in:
parent
213a5a4300
commit
884e8d08a8
2 changed files with 31 additions and 12 deletions
|
|
@ -3,16 +3,16 @@
|
|||
*/
|
||||
package akka.pattern
|
||||
|
||||
import language.implicitConversions
|
||||
|
||||
import java.util.concurrent.TimeoutException
|
||||
|
||||
import akka.actor._
|
||||
import akka.dispatch.sysmsg._
|
||||
import scala.annotation.tailrec
|
||||
import scala.util.control.NonFatal
|
||||
import scala.concurrent.{ Future, Promise, ExecutionContext }
|
||||
import akka.util.{ Timeout, Unsafe }
|
||||
import scala.util.{ Success, Failure }
|
||||
|
||||
import scala.annotation.tailrec
|
||||
import scala.concurrent.{ ExecutionContext, Future, Promise }
|
||||
import scala.language.implicitConversions
|
||||
import scala.util.{ Failure, Success }
|
||||
|
||||
/**
|
||||
* This is what is used to complete a Future that is returned from an ask/? call,
|
||||
|
|
@ -177,9 +177,8 @@ final class AskableActorSelection(val actorSel: ActorSelection) extends AnyVal {
|
|||
*/
|
||||
private[akka] final class PromiseActorRef private (val provider: ActorRefProvider, val result: Promise[Any], _mcn: String)
|
||||
extends MinimalActorRef {
|
||||
import AbstractPromiseActorRef.{ stateOffset, watchedByOffset }
|
||||
import PromiseActorRef._
|
||||
import AbstractPromiseActorRef.stateOffset
|
||||
import AbstractPromiseActorRef.watchedByOffset
|
||||
|
||||
// This is necessary for weaving the PromiseActorRef into the asked message, i.e. the replyTo pattern.
|
||||
@volatile var messageClassName = _mcn
|
||||
|
|
@ -308,7 +307,7 @@ private[akka] final class PromiseActorRef private (val provider: ActorRefProvide
|
|||
watchers foreach { watcher ⇒
|
||||
// ➡➡➡ NEVER SEND THE SAME SYSTEM MESSAGE OBJECT TO TWO ACTORS ⬅⬅⬅
|
||||
watcher.asInstanceOf[InternalActorRef]
|
||||
.sendSystemMessage(DeathWatchNotification(watcher, existenceConfirmed = true, addressTerminated = false))
|
||||
.sendSystemMessage(DeathWatchNotification(this, existenceConfirmed = true, addressTerminated = false))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue