Grand Central Dispatch — concurrent and serial dispatch queues

Dispatch queues

The best way to explain how both kind of execution works will be by creating an analogy. Imagine your queue as a restaurant, the work as ‘to eat’. Also you can imagine the serial and concurrent execution as the concierge of this restaurant.

Serial queues

Concurrent queues

Which one is better?

How to create a serial queue in Swift?

How to create a concurrent queue in Swift?

It is not that complicated, right? Now you’re good to go. You can start using serial and concurrent queues in your swift project.

Computer Engineer + iOS Engineer. I am interested in Swift, Kotlin, Firebase, Data Structures, ASO & On Solving Real World Problems.

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