As far as I understand, GCD queues with a non-standard queue are by default serial only on devices with single-core processors. But if the device has several cores, it may happen that the blocks in the queue are executed simultaneously.
I want to use a sequential GCD queue to solve some concurrency problems, and this queue should be sequential even if there are several cores.
The developer noted that this is possible. How to create such an always-sequential queue?
GCD, dispatch_get_global_queue, .
dispatch_get_global_queue
gcd, dispatch_queue_create. DISPATCH_QUEUE_SERIAL .
DISPATCH_QUEUE_SERIAL
:dispatch_queue_t concurrentQueue = dispatch_queue_create("com.aj.concurrent.queue", DISPATCH_QUEUE_CONCURRENT);
dispatch_queue_t concurrentQueue = dispatch_queue_create("com.aj.concurrent.queue", DISPATCH_QUEUE_CONCURRENT);
:dispatch_queue_t serialQueue = dispatch_queue_create("com.aj.serial.queue", DISPATCH_QUEUE_SERIAL);
dispatch_queue_t serialQueue = dispatch_queue_create("com.aj.serial.queue", DISPATCH_QUEUE_SERIAL);