本文介绍了在Akka中,ActorContext线程安全吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
按照标题,可以安全地从多个线程(甚至是当前未执行该角色的线程)中安全地使用从一个actor中提取的ActorContext来创建要作为原始actor的子代的actor?
As per title, can an ActorContext extracted from within an actor be safely used from multiple threads (even those where the actor is not currently executing), for the creation of actors meant to be children of the original actor?
推荐答案否。 ActorContext是不是线程安全,并且不应转义到其他线程。
No. ActorContext is not thread-safe and shouldn't escape to other threads.
更多推荐
在Akka中,ActorContext线程安全吗?
发布评论