You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There appears to be an issue with modifying state during view update in one code path. The issue is that parent.camera is a @Binding, so we're mutating state up the chain.
In years past, I would have just reached for dispatch_async, even though it feels a bit dirty. This guy who claims to work at Apple also seems to agree that it's an acceptable solution as of 2021, but Swift 6 is still trying to figure out a new concurrency story which may complicate things. Does anyone have a better idea?
The text was updated successfully, but these errors were encountered:
Looking at MapKit. Pretty much every type is wrapped in @MainActor @preconcurrency, including their Map view, annotations, etc. Given this library is also just UI, a solution like that seems to make sense here as well. Anything you can think of that needs to be allowed to run on another thread?
There appears to be an issue with modifying state during view update in one code path. The issue is that
parent.camera
is a@Binding
, so we're mutating state up the chain.In years past, I would have just reached for
dispatch_async
, even though it feels a bit dirty. This guy who claims to work at Apple also seems to agree that it's an acceptable solution as of 2021, but Swift 6 is still trying to figure out a new concurrency story which may complicate things. Does anyone have a better idea?The text was updated successfully, but these errors were encountered: