I want to create two consecutive queues A and B. Where queue B is the goal of queue A. I want to queue some blocks on B and pause it until I am ready to execute them, however I want to continue executing the blocks in queue A.
If I paused B, would it also pause his target queue (queue A)?
My thinking is that I want to schedule these specific blocks (in queue B) for execution at a later (undefined) date, however I do not want them to ever start at the same time (this includes the main data ^ _ ^ ) and I do not want to deal with semaphores. But I want Queue A to continue to process its blocks, and B to pause.
In case here it was not clear what code example
dispatch_queue_t queueA = dispatch_queue_create("app.queue.A"); dispatch_queue_t queueB = dispatch_queue_create("app.queue.B"); dispatch_set_target_queue( queueB, queueA ); dispatch_suspend( queueB );
Jonathan
source share