Designing, testing, and maintaining concurrent algorithms in Swift is hard and getting the details right is critical to the success of your app. A concurrent algorithm (also called parallel programming) is an algorithm that is designed to perform multiple (perhaps many) operations at the same time to take advantage of more hardware resources and reduce overall execution time.
On Apple’s platforms, the traditional way to write concurrent algorithms is NSOperation. The design of NSOperation invites the programmer to subdivide a concurrent algorithm into individual long-running, asynchronous tasks. Each task would be defined in its own subclass of NSOperation and instances of those classes would be combined via an objective API to create a partial order of tasks at runtime. This method of designing concurrent algorithms was the state of the art on Apple’s platforms for seven years.
In 2014 Apple introduced Grand Central Dispatch (GCD) as a dramatic step forward in the expression of concurrent operations.