#swift Multi-Threading using GCD For Beginners.
▻https://hackernoon.com/swift-multi-threading-using-gcd-for-beginners-2581b7aa21cb?source=rss---
Introduction: What is Grand Central Dispatch (GCD)According to Apple:“GCD provides and manages FIFO queues to which your application can submit tasks in the form of block objects. Work submitted to dispatch queues are executed on a pool of threads fully managed by the system. No guarantee is made as to the thread on which a task executes.”In other words, GCD is an API provided by apple to allow you to manage concurrent operations in a smooth way, in order to avoid freezing of your application and keep it always responsive for users.Types of Queues:When dealing with GCD, there are 3 types of queues:1- The Main Queue:This Queue has the highest priority of all , and it runs on the main thread.All UI updates should be done on this thread or otherwise lagging and weird crashes will occur in your (...)