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

feat: write separation #875

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dickens7
Copy link
Contributor

@dickens7 dickens7 commented Sep 15, 2024

我们业务场景是通过 wokerpool(worker 设置为1) 将所有主逻辑都投递到一个协程中运行的, 所以我们需要异步进行写操作。
但是现在的异步写会继续投递到 workerpool中,这在我们的场景中是无意义的。

这个pr是将所有写操作投递到独立的协程中进行

https://github.com/dickens7/rpcx/blob/04390ab447af4eaad705cb5123b06e97d362aa56/server/server.go#L1114

这里需要注意,当前chan满了之后会直接丢弃消息

@dickens7 dickens7 marked this pull request as ready for review September 23, 2024 01:34
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

Successfully merging this pull request may close these issues.

1 participant