gpt4 book ai didi

scala - 在 akka 2.x 中,root actor 是否由其他人监督?

转载 作者:行者123 更新时间:2023-12-02 04:39:56 25 4
gpt4 key购买 nike

阅读 Akka 文档:http://doc.akka.io/docs/akka/2.2.3/AkkaScala.pdf它在部分中的状态

2.2.1 Hierarchical Structure
The only prerequisite is to know that each actor has exactly one supervisor,
which is the actor that created it.

但是在层次结构树的顶部,父 actor 没有主管?

最佳答案

akka doc 中有很好的解释(参见顶级主管部分),其中的一小段摘录:

enter image description here

The root guardian is the grand-parent of all so-called “top-level” actors and supervises all the special actors mentioned in Top-Level Scopes for Actor Paths using the SupervisorStrategy.stoppingStrategy, whose purpose is to terminate the child upon any type of Exception. All other throwables will be escalated … but to whom? Since every real actor has a supervisor, the supervisor of the root guardian cannot be a real actor. And because this means that it is “outside of the bubble”, it is called the “bubble-walker”. This is a synthetic ActorRef which in effect stops its child upon the first sign of trouble and sets the actor system’s isTerminated status to true as soon as the root guardian is fully terminated (all children recursively stopped).

关于scala - 在 akka 2.x 中,root actor 是否由其他人监督?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21048996/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com