-
Notifications
You must be signed in to change notification settings - Fork 54
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
Reuse notify channel when blocked on read #291
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #291 +/- ##
==========================================
- Coverage 83.32% 83.19% -0.14%
==========================================
Files 40 40
Lines 2759 2761 +2
==========================================
- Hits 2299 2297 -2
- Misses 335 338 +3
- Partials 125 126 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
close(notify) | ||
if waiting { | ||
select { | ||
case b.notify <- struct{}{}: |
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.
It will only wake one reading if there are multiple readings blocked and the other will blocked infinite, I believe pion doesn't have this use case now but it would be safer to keep the behavior since it is a public repo.
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.
reading concurrently from a buffer doesn't make sense. this isn't a reasonable expectation.
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.
Agree that is not reasonable for the rtp/rtcp packets, just concern if there was other user use it as a normal buffer since it can be used to store any data.
No description provided.