November 2013
Intermediate to advanced
576 pages
19h 3m
English
Open the sample app, and select the row called Dispatch Queue-Concurrent. The five initial items in the table view are visible, and they are scrollable while the long-running tasks are being processed (view the debugging console to confirm that they are being processed while scrolling the table view). After the tasks are completed, the additional rows become visible. Notice that this approach completes significantly faster than any of the previous approaches.
To start the long-running tasks in the viewDidAppear: method, the app gets a reference to the high-priority concurrent dispatch queue:
dispatch_queue_t workQueue =dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0);
Using
Read now
Unlock full access