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

【任务发布】优化主循环,使用信号机制处理任务 #46

Open
GnoCiYeH opened this issue Oct 26, 2024 · 0 comments
Open

Comments

@GnoCiYeH
Copy link
Member

目前dragonreach是单线程逻辑,主循环中主要处理以下事务:
UzrEfyVPk3

主要为:

  • 观测子进程及服务状态
  • 观测计时器任务
  • 监听外部命令

目前的主线程逻辑会一直循环,但是真正执行任务的时间很短,导致大量的cpu资源浪费。

有更优雅的方式去处理主循环:

  • 阻塞读命令管道
  • 子进程状态以及计时器任务可以使用信号等机制优化
@GnoCiYeH GnoCiYeH changed the title 优化主循环,使用信号机制处理任务 【任务发布】优化主循环,使用信号机制处理任务 Oct 26, 2024
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

1 participant