The purpose of this interview preparation series is to assist you in quickly refining your interview skills and thoroughly preparing for the typical questions asked during an iOS interview. If you find it useful, please leave a comment or tap the like button.
Overview
In part 2, we will delve deeper into GCD to refresh your understanding of the fundamental concepts. GCD, which stands for Grand Central Dispatch, is an extremely popular concurrency technique that finds widespread application in various scenarios. Whether it involves transforming API responses into data models or offloading resource-intensive tasks from the main thread, GCD proves to be an indispensable tool. Mastering GCD is undoubtedly crucial when it comes to iOS interviews, as it ranks among the most significant topics in the field.
Grand Central Dispatch — GCD
GCD is a low-level API that provides a way to run blocks of code concurrently on multicore hardware. It is built on top of threads. Under the hood, it manages a shared thread pool. With GCD, you add blocks of code or work items to dispatch queues, and it’s up to GCD to decide which thread to execute them on.