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

[BUG] RxApp.SuspensionHost.GetAppState sometimes returns null due to concurrency issues #3192

Closed
tomasfil opened this issue Feb 23, 2022 · 1 comment · Fixed by #3193
Closed
Labels

Comments

@tomasfil
Copy link
Contributor

Describe the bug

Sometimes upon restoring AppState, the state would be null, because GetAppState can be called before app gets loaded and thus before suspension driver loaded app state.
https://user-images.githubusercontent.com/34779382/155291750-546fa71a-8897-4a30-9e8a-7205d1ace8a4.mp4

Expected behaviour

GetAppState should always return object, not null.

@tomasfil tomasfil added the bug label Feb 23, 2022
tomasfil pushed a commit to tomasfil/ReactiveUI that referenced this issue Feb 23, 2022
glennawatson pushed a commit that referenced this issue Apr 11, 2022
…turns (#3193)

* Ensure the appState is loaded only once and GetAppState always returns

fixes #3192

* Interlocked.Exchange with func

Using Interlocked.Exchange to prevent dead lock and Threading issues.

Co-authored-by: Tomáš Filip <tomas.filip@meac.cz>
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 26, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant