-
Notifications
You must be signed in to change notification settings - Fork 19
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
P2P: async buffer #109
P2P: async buffer #109
Conversation
ready @hinto-janai @SyntheticBird45 |
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 may be a bad reviewer on this one since I'm not comfortable with async implementations, but I didn't found anything strange.
Will review tomorrow but some questions:
|
I don't think so, this is more than just a helper function/ type
It's used to bound the channel, you specify a max weight and a weight for each item. For the block downloader the weight will be the size, in bytes, of the downloaded batch of blocks.
I couldn't find one, I don't think this is too much to maintain. |
This adds an async buffer that works as a queue which supports arbitrary weights for values.
This is used between the block downloader and Cuprate.