I have a progress indicator
@Published var progress:Float
I read elsewhere that @Published is thread-safe, so it should be fine for me to read the value from any thread.
Of course, I only want to send writes on @MainActor as they drive the UI.
Q1) Am I right in thinking that I'm safe to read from any thread - provided I'm careful to write only on @MainActor
(Are there any deadlock dangers I should be aware of?)
Q2) Is there any good approach to enforce this?
//conceptually...
@MainActor(set)
@Published var progress:Float
I guess a macro which writes creates a setter/getter could be a solution when I can move to XCode 15...