在Akka中,ActorContext线程安全吗? [英] In Akka, is ActorContext thread safe?

查看:193
本文介绍了在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线程安全吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆