Junior — Middle
Which queue class implements a global access or global queue?
sobes.tech AI
Answer from AI
In iOS, the global queue is implemented using the DispatchQueue class with the method global().
A global queue is a system-managed queue available throughout the app. It is used for executing background tasks with different priority levels.
Example of using a global queue:
DispatchQueue.global(qos: .background).async {
// Code executed in the background
print("Running on global queue")
}
Here, DispatchQueue.global() returns a global queue with the specified quality of service (QoS).