
# Unstructured Concurrency in iOS
A few months ago, I started noticing something strange in my app. Nothing was crashing. Nothing obvious was broken. But occasionally: users saw stale data appear briefly network requests were triggered twice UI updates happened after a screen had already disappeared Naturally, we checked the usual suspects: race conditions caching bugs API inconsistencies Everything looked fine. Until we started tracing the execution paths. That's when we found them. Not one. Not two. But dozens of tiny Task {} blocks scattered across the codebase . Each one looked harmless during code review. Each one worked perfectly in isolation. But together they created something far more subtle: unstructured concurrency . And once we looked deeper, we discovered something even more interesting. Many of those tasks were also interacting with @MainActor -isolated code in ways that quietly turned the UI thread into a traffic bottleneck. No crashes. No compiler warnings. Just strange behavior that only appeared under
Continue reading on Dev.to
Opens in a new tab



