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

Fix tasks notification in mplex #452

Closed
tomaka opened this issue Sep 4, 2018 · 0 comments
Closed

Fix tasks notification in mplex #452

tomaka opened this issue Sep 4, 2018 · 0 comments
Assignees
Labels
difficulty:easy priority:important The changes needed are critical for libp2p, or are blocking another project

Comments

@tomaka
Copy link
Member

tomaka commented Sep 4, 2018

Right now when we read data from the underlying stream, only a single random task is notified, and this task will notify the other tasks. This is not a very optimal design.

Worse: if multiple substreams try to write, only one task will be notified and not the others.

This can be fixed by creating a separate task for the underlying stream and using the various _notify methods: https://docs.rs/futures/0.1.23/futures/executor/struct.Spawn.html

@tomaka tomaka added priority:important The changes needed are critical for libp2p, or are blocking another project difficulty:easy labels Sep 4, 2018
@tomaka tomaka self-assigned this Sep 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:easy priority:important The changes needed are critical for libp2p, or are blocking another project
Projects
None yet
Development

No branches or pull requests

1 participant