Atomic bRun in socket#3788
Merged
Merged
Conversation
Closed
ann0see
reviewed
Jul 17, 2026
ann0see
left a comment
Member
There was a problem hiding this comment.
Looks good but I'll need to test it on ARM and x86.
We'll need to hunt for similar bugs then. Especially in the windows audio code.
pljones
reviewed
Jul 17, 2026
Collaborator
|
I'll give the Windows Client and Linux Server a test today. |
Member
|
Actually, testing on iOS would also be beneficial |
Member
Author
|
Worked fine on arm64 Pi. I'll test on x86 Mac later. |
Member
Author
|
Seems to behave fine as both server and client on Mac x86 10.15 |
ann0see
approved these changes
Jul 17, 2026
ann0see
left a comment
Member
There was a problem hiding this comment.
I am now back on the initial network where I saw the hang, and it seems good now.
Tested with macOS Apple Silicon
mcfnord
pushed a commit
to mcfnord/jamulus
that referenced
this pull request
Jul 18, 2026
softins already makes this member atomic in jamulussoftware#3788 (which also removes CSocket::Close in favour of non-blocking reads). Keep only the bJitterBufferOK conversion in this file; the <atomic> include moves to match jamulussoftware#3788 so the two branches merge cleanly in either order. Co-Authored-By: Claude Fable 5 <[email protected]>
Collaborator
|
Yeah, no problems between WIndows and Linux yesterday (both x64 machines, so unlikely to suffer). |
pljones
approved these changes
Jul 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description of changes
Make the bRun boolean in the socket class atomic, for thread safety. Also remove the CSocket::Close method, as it is no longer needed with non-blocking socket reads.
CHANGELOG: Internal: Improve thread safety in socket handling
Context: Fixes an issue?
Replaces #3786 and expands on it, following on from #3774
Does this change need documentation? What needs to be documented and how?
No, bug fix and refactor only
Status of this Pull Request
Ready for review
What is missing until this pull request can be merged?
Checking on all main platforms
Checklist