Skip to content

Conversation

@jsalaber
Copy link
Collaborator

@jsalaber jsalaber commented Aug 27, 2025

Changes

  • use a DispatchQueue to synchronize setting and getting user configs to prevent issue where thread is accessing a garbage collected userConfig

@jsalaber jsalaber requested a review from a team as a code owner August 27, 2025 20:50
}

func getUserConfig() -> UserConfig? {
return userConfigQueue.sync { [weak self] in
Copy link
Member

Choose a reason for hiding this comment

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

are there any tests we can add to check that getting/setting this data across multiple threads is safe?

@jsalaber jsalaber force-pushed the fix-setting-user-config-multiple-threads branch from 91ddf8d to f46854e Compare August 28, 2025 16:45
@jsalaber jsalaber merged commit 6550bf5 into main Aug 28, 2025
8 of 10 checks passed
@jsalaber jsalaber deleted the fix-setting-user-config-multiple-threads branch August 28, 2025 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants