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

remove the recvLock in the stream #42

Merged
merged 1 commit into from
Feb 17, 2021
Merged

Conversation

marten-seemann
Copy link
Contributor

@marten-seemann marten-seemann commented Feb 16, 2021

Concurrent use of an io.Reader is not valid.

Copy link
Member

@Stebalien Stebalien left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For context:

  1. mplex definitely isn't threadsafe for parallel reads.
  2. This lock existed so we could share the receive buffer between the stream's receive loop and the reader. The receive buffer is now thread-safe internally.

Concurrent use of an io.Reader is not valid.
@marten-seemann marten-seemann merged commit 67e9bf6 into master Feb 17, 2021
@marten-seemann marten-seemann deleted the remove-recv-lock branch February 17, 2021 02:50
@Stebalien Stebalien mentioned this pull request May 11, 2021
27 tasks
@aschmahmann aschmahmann mentioned this pull request May 14, 2021
71 tasks
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.

2 participants