Syncing multiple asynchronous tasks in Swift

Multiple Independent Tasks (Concurrent Queue)

We can have different async tasks which are independent of each other. It means we can run them in any order and the result of one is not related to the other task.

DispatchGroup

Grand Central Dispatch or GCD automatically manages the thread creation and balances them based on available device resources in iOS.

Task albums is doneTask posts is doneTask todos is doneTask comments is doneTask users is doneTask photos is doneAll Tasks are done

Promises

There is a pattern which is highly recommended to solve this issue: Promises.

--

--

I’m an iOS developer with 6+ years of expertise building mobile apps, working among a team of talented developers to create some sports apps at Pulselive.

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Soheil Novinfard

Soheil Novinfard

I’m an iOS developer with 6+ years of expertise building mobile apps, working among a team of talented developers to create some sports apps at Pulselive.