wtg / Shuttle-Tracker-SwiftUI

Rensselaer campus shuttle tracker
https://shuttletracker.app
Mozilla Public License 2.0
9 stars 2 forks source link

Actor-isolate shared, mutable state #111

Closed Gerzer closed 1 year ago

Gerzer commented 1 year ago

Currently, ViewState and SheetStack are classes, but we should refactor them into actors so that we can take advantage of the race-prevention guarantees that actors bring. As we migrate to async-await, all shared, mutable state that can be accessed from different asynchronous tasks should be actor-isolated.

Gerzer commented 1 year ago

This can actually be addressed by isolating those classes to the main actor instead of refactoring them into actors themselves.