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

Replace unbounded channels with bounded ones #973

Closed
tomaka opened this issue Feb 26, 2019 · 2 comments
Closed

Replace unbounded channels with bounded ones #973

tomaka opened this issue Feb 26, 2019 · 2 comments
Labels
difficulty:moderate getting-started Issues that can be tackled if you don't know the internals of libp2p very well priority:nicetohave

Comments

@tomaka
Copy link
Member

tomaka commented Feb 26, 2019

We have two usages of mpsc::UnboudedSender/mpsc::UnboundedReceiver. In order to avoid possible issues with the buffer growing forever, it would be nice to replace them with bounded channels (ie. mpsc::Sender/mpsc::Receiver).

@tomaka tomaka added priority:nicetohave difficulty:moderate getting-started Issues that can be tackled if you don't know the internals of libp2p very well labels Feb 26, 2019
@tomaka
Copy link
Member Author

tomaka commented Apr 22, 2019

The one (important) remaining usage is in NodeTask.
I suggest to rewrite NodeTask::poll() in a more clean way, and while doing so also avoid the mem::replace(&mut self.inner, NodeTaskInner::Poisoned), as we do this every single time we poll, and this tends to consume quite a lot of CPU in memcpying.

@tomaka
Copy link
Member Author

tomaka commented Apr 30, 2020

This has been finished, in #1440 if I'm not mistaken.

@tomaka tomaka closed this as completed Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:moderate getting-started Issues that can be tackled if you don't know the internals of libp2p very well priority:nicetohave
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants