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] Added shared_lock to srt::sync. #2996

Merged
merged 2 commits into from
Aug 7, 2024

Conversation

maxsharabayko
Copy link
Collaborator

@maxsharabayko maxsharabayko commented Aug 5, 2024

  • Added srt::sync::SharedLock to non-exclusively lock srt::sync::SharedMutex.
  • Added srt::sync::ExclusiveLock to exclusively lock srt::sync::SharedMutex. Won't reuse srt::sync::ScopedLock as a template to avoid specifying the type of mutex each time (ScopedLock<Mutex>). Could be typedefed, but the ScopedLock definition would have to be moved out of the POSIX version then (not a bad thing though).
  • Added srt::sync::CSharedObjectPtr class essentially combines SharedMutex and a pointer to an object to gain access.
  • Changed CUDT::m_pListener to srt::sync::CSharedObjectPtr.

Closed #2984 (replaces).

@maxsharabayko maxsharabayko added Type: Maintenance Work required to maintain or clean up the code [core] Area: Changes in SRT library core labels Aug 5, 2024
@maxsharabayko maxsharabayko added this to the v1.5.4 milestone Aug 5, 2024
@maxsharabayko maxsharabayko force-pushed the develop/shared-lock branch 2 times, most recently from 8cd78a5 to 1ef6ecb Compare August 5, 2024 13:00
@maxsharabayko maxsharabayko marked this pull request as ready for review August 5, 2024 13:01
@maxsharabayko maxsharabayko merged commit 1919479 into Haivision:master Aug 7, 2024
12 checks passed
@maxsharabayko maxsharabayko deleted the develop/shared-lock branch August 7, 2024 08:51
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: Maintenance Work required to maintain or clean up the code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant