Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

支持在 rpc 方法中使用回调函数 #7

Closed
DingpingZhang opened this issue Jul 28, 2021 · 1 comment
Closed

支持在 rpc 方法中使用回调函数 #7

DingpingZhang opened this issue Jul 28, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request invalid This doesn't seem right wontfix This will not be worked on

Comments

@DingpingZhang
Copy link
Member

DingpingZhang commented Jul 28, 2021

本需求将在实现 #12 后再考虑,其实现经验将有利于本需求。

@DingpingZhang DingpingZhang added the enhancement New feature or request label Jul 28, 2021
@DingpingZhang DingpingZhang self-assigned this Jul 28, 2021
@DingpingZhang DingpingZhang mentioned this issue Aug 14, 2021
4 tasks
@DingpingZhang
Copy link
Member Author

恐怕无法实现回调函数,回调函数与事件的不同在于:事件的注册与注销有明确的语法(+= and -=)指示。但是,回调函数的注册与注销,完全取决于服务端在实现合同接口时,是否缓存了该回调函数的引用。
一般地,若仅在函数作用域内使用回调函数,则在函数调用开始时注册,调用结束时注销是合理的;但如果缓存回调到类字段,那么在原函数执行完成后,客户端将无法继续接收消息。

@DingpingZhang DingpingZhang added invalid This doesn't seem right wontfix This will not be worked on labels Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request invalid This doesn't seem right wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

1 participant