嗨,我在actor的receive方法中有两个示例:
第一个不缓存发送方参与者进行管道传递
val futureV = //Some function call that returns a Future
futureV.pipeTo(sender)
Run Code Online (Sandbox Code Playgroud)
第二个将发件人置于val中
val currentS=sender
val futureV = //Some function call that returns a Future
futureV.pipeTo(currentS)
Run Code Online (Sandbox Code Playgroud)
我的问题是哪种编码方法正确,为什么?