-
Notifications
You must be signed in to change notification settings - Fork 2
Implemented flow-control on message forwarder. #18
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
Conversation
Also added a placeholder on the msgpackrouter constructor to specify the desired queue size (it will be implemented later).
9dd1255 to
d0c942d
Compare
dido18
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would document the semantic meaning of Maxworker=0
In the current implementation, it means no worker limit: every call to startWorker spawns a new goroutine (i.e., "disable worker pool.")
Ok, done |
Motivation
Fix #15
Change description
This change mainly affects the
msgpackrpclibrary, where the read-loop runs and spawns "worker" goroutines.To effectively pause reading from a client, we need to limit the number of parallel workers for each client, and this is what this PR does.
Additional Notes
Reviewer checklist
main.