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

Fix potential deadlock #962

Merged
merged 1 commit into from
Mar 27, 2025
Merged

Fix potential deadlock #962

merged 1 commit into from
Mar 27, 2025

Conversation

stephencelis
Copy link
Member

Unfortunately #946 introduced a deadlock when assertSnapshot is called on the main thread but not the main queue, so let's revert to the old code path for now with an explicit Test.current check to avoid the original issue.

Fixes #961.

Unfortunately #946 introduced a deadlock when `assertSnapshot` is called
on the main thread but not the main queue, so let's revert to the old
code path for now with an explicit `Test.current` check to avoid the
original issue.

Fixes #961.
@stephencelis stephencelis requested a review from mbrandonw March 26, 2025 22:27
@stephencelis stephencelis changed the title Fix regression Fix potential deadlock Mar 26, 2025
@stephencelis
Copy link
Member Author

@jcavar Can you please run your tests against this branch?

@peterkovacs @doozMen Can you please verify that the original problem is still addressed?

@peterkovacs
Copy link
Contributor

I can't recall if it was a crash that would happen with every test run, but I've run with this branch a few dozen times and all runs were successful.

@jcavar
Copy link

jcavar commented Mar 27, 2025

This branch works for me. Thank you!

@stephencelis stephencelis merged commit dba517b into main Mar 27, 2025
4 of 5 checks passed
@stephencelis stephencelis deleted the fix-deadlock branch March 27, 2025 16:53
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.

Deadlock when assertSnapshot called on main thread but not on main queue
4 participants