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: stabilize label updates and revision locking in the asyncResourceGatherer #384

Merged
merged 5 commits into from
Jun 26, 2024

Conversation

PaideiaDilemma
Copy link
Collaborator

@PaideiaDilemma PaideiaDilemma commented Jun 26, 2024

Was able to repro #357 (multiple monitors required i think).
Fixes it on my end.

4509552 reverts the previous approach of adding a timer to re-render, when the resource was not available (#152). It also sets needsFrame=true, when render is called but frameCallback is present (I think not 100% needed but still makes sense)

The other 3 commits make sure that getAssetById fails less often by removing the busy flag and revisioning the locking in the resource gatherer.

-fsanitize=thread is a bit happier regarding the asyncResourceGatherer now. Besides some races with dmas on startup I think.

Closes #367

Makes getAssetById fail less often and thus labels get more stable
updates
`assetsMutex` was not needed, since `apply` only gets called from the
main thread and resources are also only aquired via the main thread.

`preloadTargets`, previously kinda guarded by the `busy` flag are now
locked as suggested in hyprwm#367 (but via a copy of `peloadTargets`).

`apply` now returns a boolean so that the locking of preloadTargets in
combination with checking `preloadTargets.empty()` is a bit nicer.
Copy link
Member

@vaxerski vaxerski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks!

@vaxerski vaxerski merged commit 318c00d into hyprwm:main Jun 26, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Datarace in CAsyncResourceGatherer
2 participants