简体   繁体   English

播放应用中的ActorSystem费用

[英]ActorSystem expenses in play application

I have a question , is it expansive for productivity, do ActorSystem system = ActorSystem.create("System"); 我有一个问题,它对于生产力是否广泛,做ActorSystem system = ActorSystem.create("System"); many times, or I must do this once and use one reference ? 很多次,或者我必须这样做一次并使用一个参考?

You should create only one ActorSystem , from the Akka doc : 您应该只创建一个来自Akka doc的 ActorSystem

An ActorSystem is a heavyweight structure that will allocate 1…N Threads, so create one per logical application ActorSystem是一个重量级结构,它将分配1 ... N个线程,因此每个逻辑应用程序创建一个

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM