Implementing an Asynchronous Dispatch Queue

Previously, I introduced the concept of dispatch queues. Here’s a quick review of what a dispatch queue is, in case you haven’t read the previous article: The dispatcher contains multiple generic-use threads and a work queue. Threads can dispatch single functional operations to run asynchronously on the dispatch work threads. Apple is encouraging its app …

Dispatch Queues

Last week's article discussed the problem with threads. But since threads are simply a fact of life with our current development tools, how can we reduce risk and complexity? Apple's solution: general purpose dispatch queues. In Apple's own words: Dispatch queues let you execute arbitrary blocks of code either asynchronously or synchronously with respect to …