As you investigate this, keep in mind that the main thread and the main queue are related but not exactly the same thing. This post has code that highlights that difference.
I understand this but thousands of libraries use main thread checks as seatbelts which we can't just disable and the impression provided by what documentation exists for the MainActor is that it is a special-cased global actor with a single-threaded executor such that all calls isolated to the MainActor will be executed by the same thread. If this is not the case it breaks almost every Swift library in existence that makes display calls.
I would expect Thread.isMainThread to always return true in a block isolated to the MainActor. I actually would have used some other test of isolation but prior to 5.9 there is none and I am forced to write code that supports iOS 14.
That isn't the point of this issue though. I just used that thread test above because it is the only tool I have at my disposal to test this behaviour and MainActor is documented to behave in a manner that that test should always pass.
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: