[release/3_12] Backport of #3800 - #3853
Conversation
The socket, high-precision timer and sound threads are stopped by a plain bool written from another thread, and the jitter-buffer status flags are written and read/reset from different threads. Convert these six flags to std::atomic<bool>: - CSocketThread::bRun - CHighPrecisionTimer::bRun (Mac/Linux variant) - CSoundBase::bRun - CSoundBase::bCallbackEntered - CSocket::bJitterBufferOK - CClient::bJitterBufferOK The read-and-reset functions now use exchange() so a "not OK" written between a separate read and reset can no longer be lost. Addresses batches A and B of #3798. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
softins already makes this member atomic in #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 #3788 so the two branches merge cleanly in either order. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
softins
left a comment
There was a problem hiding this comment.
Looks fine to me. Compared, compiled and smoke-tested.
|
MY LLM WROTE:
Either backport #3788 as well, or restore that one line here. #3788 also changed |
Yes, missed that. #3788 is dependent on the change to two separate sockets for IPv4 and IPv6, which is not in 3.12.x. That would have slipped through the compile and smoke-test. So the change of In fact, you just need to revert 20697a7 |
|
OK, thanks, I'll get the revert pushed. https://github.com/jamulussoftware/jamulus/actions/runs/30760042638 |
Short description of changes
Backport of #3800
CHANGELOG: SKIP
Context: Fixes an issue?
git cherry-pickneeded a small, manual patch on the first commit, to add inbEnableIPv6, which has been removed onmain.Does this change need documentation? What needs to be documented and how?
N/A
Status of this Pull Request
Needs @mcfnord and @softins to check.
What is missing until this pull request can be merged?
...getting all the targets clean would be enough, I hope...
https://github.com/jamulussoftware/jamulus/actions/runs/30757002725 ✅
(manually triggered as
release/*doesn't work as a trigger for builds onjamulussoftware/jamulus)Checklist
AUTOBUILD: Please build all targets