Swift Concurrency - never main thread
Swift Forums
Swift Concurrency - never main thread
I have a function from a legacy library which asserts that it's not running on the main thread: func foo() { if Thread.isMainThread { assertionFailure("should not be called from the main thread") return } // .... } I need to call that function from a Swift Testing test, which as I understand can be called on any actor/thread including the main one. I was planning to wrap it in a function like this: func safeFoo() { foo() } How can I garantee using Swift Concurrency that it won't ...
0 comments
No comments yet.