Repository navigation
libobs: Make a source's removed flag atomic (#2105) - #2106
Merged
Merged
Conversation
Member
Author
|
GREEN: TSan run 40080552267 on this branch has 0 reports touching source->removed (obs-source.c.h:963/976, obs-scene.c.h:2075, obs_view_source_removed), against 96 report lines in master run 40074741825. |
6 of 7 tasks
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.
Fixes #2105
obs_source_removesetssource->removedon the UI thread while the render threads read it:obs_source_removed,obs_view_source_removedandobs_scene_add_internal. The field is nowvolatile boolinobs-internal.h(not a public header), and all five sites useos_atomic_load_bool/os_atomic_set_bool, as #2083 did for activate_refs and show_refs. The flag only ever goes false to true, so behavior is unchanged. Rust reads it only throughobs_view_source_removed.RED: TSan run 40074741825 on master has 28 reports of obs-source.c.h:976 against :963. Only TSan shows the race, so there's no Tier 2 RED. GREEN is the TSan run dispatched on this branch, and I'll post its counts.
./lintpasses; Tier 2 in PR CI checks behavior is unchanged.