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

使用新的worker合作模式 #21

Open
gxm11 opened this issue May 20, 2023 · 0 comments
Open

使用新的worker合作模式 #21

gxm11 opened this issue May 20, 2023 · 0 comments

Comments

@gxm11
Copy link
Owner

gxm11 commented May 20, 2023

准备参考erlang的设计,使用”Actor“模式,给worker分组,每组在同一个线程执行,组间以协程方式执行。

erlang教程:https://www.tutorialspoint.com/erlang/index.htm

以下几点可能要考虑:

  1. 被动线程可以简化操作,不参与协程,都是就地执行。但如果是其他线程的被动线程,还是要发送任务。
  2. group中一个worker退出会导致其他worker一起退出,但是不会导致其他的group退出。
  3. wait同一个group可以忽略,但是wait其他的group的worker需要真的等待。
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