Repository navigation
Synchronize updater status access - #263
Open
dajiaohuang wants to merge 2 commits into
Open
dajiaohuang wants to merge 2 commits into
dajiaohuang wants to merge 2 commits into
Conversation
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.
The update worker and front ends access the status queue and ZSync client concurrently. Protect the message queue, publish the client with atomic shared-pointer operations, and synchronize state reads and error-state writes. Readers outside the updater mutex retain client snapshots for their use.
This revision removes two unnecessary snapshots: progress already holds the same mutex as every client write; the worker run phase follows initialization, after which checkForChanges sees a non-INITIALIZED state under that mutex and cannot replace the pointer. Necessary synchronization remains unchanged.
Validation on Linux x86_64 (GCC 13 / CMake 3.28):
FATAL: ThreadSanitizer: unexpected memory mapping; no TSan pass is claimed. Dependencies were linked from the normal build, not fully instrumented.All configure/build/runtime processes used isolated network namespaces. No real user AppImage, external update feed, signature keys or system package installation was used. The fixture keeps its updater alive until process exit; Qt behavior, successful updates and cancellation/destruction are not validated here (the separate cancellation report #266 remains unresolved).
Hosted CI has not been rerun manually or verified for this revision. The previous head failed before source compilation when its Docker dependency step received Debian package HTTP 404 responses; that old result is not a candidate-build result.