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 the RWMutex with a Mutex in the flow controller #2865

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

marten-seemann
Copy link
Member

Obviously, the RW feature of the mutex was not used at all.

The mutex is needed because the Read go routines on multiple streams will call AddBytesRead. However, this is a write access. The only read access we have here is from the session go routine asking for flow control updates. An RW mutex however only makes sense if you have multiple go routines performing read access.

@codecov
Copy link

codecov bot commented Nov 7, 2020

Codecov Report

Merging #2865 (3a06c18) into master (272229a) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2865   +/-   ##
=======================================
  Coverage   85.67%   85.67%           
=======================================
  Files         134      134           
  Lines        9087     9087           
=======================================
  Hits         7785     7785           
  Misses        960      960           
  Partials      342      342           
Impacted Files Coverage Δ
internal/flowcontrol/base_flow_controller.go 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 272229a...3a06c18. Read the comment docs.

@marten-seemann marten-seemann merged commit d0cdfc8 into master Nov 11, 2020
@marten-seemann marten-seemann deleted the flow-control-replace-rwmutex branch November 11, 2020 09:22
@aschmahmann aschmahmann mentioned this pull request Feb 18, 2021
73 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