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

[core] Changed lock order in bstats #2168

Merged

Conversation

maxsharabayko
Copy link
Collaborator

Now locking m_StatsLock only while accessing the m_stats structure.
Thus the locking scope is reduced, which should provide better performance. And the deadlock situation of locking m_RcvBufferLock while m_StatsLock has been acquired is avoided.

Some member variables like m_iFlowWindowSize, m_dCongestionWindow, etc. remain under the protection of m_StatsLock, which does not make much sense, as it does not save from a concurrent access.

Fixes #2167.

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Oct 16, 2021
@maxsharabayko maxsharabayko added this to the v1.4.5 milestone Oct 16, 2021
@maxsharabayko maxsharabayko merged commit c1fdb61 into Haivision:master Oct 18, 2021
@maxsharabayko maxsharabayko deleted the hotfix/bstats-lock-order branch October 18, 2021 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Deadlock in bstats(..) and sendCtrlAck()
1 participant