Closed younata closed 1 year ago
This PR prevents a main thread checker error.
Basically, the following test would actually fail prior to this PR:
@MainActor func test_example() async { await expect(Thread.isMainThread).toEventually(beTrue()) }
which, if you replace the Thread.isMainThread part, with, say, checking a UIKit API, could cause a test crash due to the main thread checker causing crashes when run in debug mode.
Thread.isMainThread
This PR prevents a main thread checker error.
Basically, the following test would actually fail prior to this PR:
which, if you replace the
Thread.isMainThread
part, with, say, checking a UIKit API, could cause a test crash due to the main thread checker causing crashes when run in debug mode.