[GCD] Dispatch Queue: cola FIF... Note

[GCD] Dispatch Queue: cola FIFO, prioridad y tipos de colas

A DispatchQueue is the object where work is sent in GCD, receiving closures instead of threads. This queue then manages when and how to execute these code blocks. It operates on a First-In, First-Out (FIFO) principle, ensuring tasks begin in the order they are dispatched, though not necessarily in the order they finish. The system assigns a priority, known as Quality of Service (QoS), to each dispatched task. These priorities range from .userInteractive for immediate UI updates to .background for unperceived tasks. Higher priority tasks receive more system resources, and misusing priorities can degrade performance. GCD offers three ways to obtain a DispatchQueue: the serial main queue tied to the UI thread, system-provided concurrent global queues for each QoS level, and custom queues created by developers. Custom queues are serial by default but can be made concurrent. The main queue is crucial for all UI-related operations. Global queues are shared and managed by the system, with a dedicated queue for each QoS. Custom queues allow developers to define their own serial or concurrent task execution environments. The label for custom queues is solely for debugging purposes. Future articles will explore synchronous versus asynchronous dispatching on serial and concurrent queues.