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

client退出的时候的执行的清理资源操作不够彻底,导致服务退出较慢 #49

Open
yangbocheng opened this issue Dec 2, 2024 · 1 comment

Comments

@yangbocheng
Copy link

  1. RegisterService HeartbeatService 等多个service 最好能共用一个cancellationTokenSource, 同时取消
  2. HeartbeatService 线程没有cancellationToken 可以快速取消
  3. 全部service的Task.Factory.StartNew 是否改用 thread实现好点。 thread 可以在退出的时候执行 interrupt方法,结合cancellationToken 清理资源
  4. 凡是service涉及到时间interval的,能否都加入配置文件,可以让用户自定义
@kklldog
Copy link
Owner

kklldog commented Dec 16, 2024

  1. 没必要吧
  2. 可以搞
  3. 现在一般不推荐继续使用 thread 了吧
  4. 还有哪个 interval 需要配置?

其实有些你可以自己改了 PR 上来

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants