Skip to content

Apparent deadlock setting optional Shared property to nil #3175

Answered by mbrandonw
humblehacker asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @humblehacker, thanks for the report. Yeah this one is a real issue, and we should have made withLock run on the @MainActor from the beginning. We thought about making @Shared main actor entirely, but that seemed to be going too far. However, withLock definitely needs to be @MainActor.

I have a fix PR'd here and it will be released with 1.12.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by humblehacker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants