I understand why dispatch_sync
would be an issue when dispatched from the main thread when dealing with UI handling, but why is it an issue when running simple XCTests? Why can't the main thread be blocked during these tests? Why do we use semaphores rather than just synchronously dispatching these network events for testing?
Thank you.