在关于Actor Worst Practices的问题上,其中一个答案说:
这篇答案是在2009年写的。这个做法现在是否仍然是良好的实践?它适用于Akka actors吗?Always send a message from an Actor-subsystem thread. If this means creating a transient Actor via the Actor.actor method then so be it:
case ButtonClicked(src) => Actor.actor { controller ! SaveTrade(trdFld.text) }
我认为我的问题不是从一个非actor发送消息到actor是否是不好的实践的重复,因为那是指旧版的actor系统。它解释了“最差实践”文章背后的原理。