stop(getSelf())vs stop(this.getSelf()) [英] stop(getSelf()) vs stop(this.getSelf())

查看:171
本文介绍了stop(getSelf())vs stop(this.getSelf())的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在研究阿卡演员。我知道停止(ActorRef)杀死正在运行的演员的意思。但是杀死一个演员时getSelf()和this.getSelf()之间的区别是什么?提前谢谢!

I have been studying Akka Actors. I know the meaning of stop(ActorRef) which kills the running actor. But what is the difference between getSelf() and this.getSelf() while killing an actor? Thank You in advance!.

推荐答案

它们之间没有区别,只是有些人认为它增强了可读性。

There's no difference between them, it's just that some people believe it enhances readability.

可读性在编程中是一件很重要的事情,但在这种特殊情况下,我个人认为无论是否有<$ c,它们都是可读的$ c>这个前缀。

Readability is an important thing in programming but in this specific case, I personally believe they are just as readable with or without the this prefix.

这篇关于stop(getSelf())vs stop(this.getSelf())的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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