You can watch this episode by subscribing to Cocoacasts Plus.

Mastering Grand Central Dispatch

Synchronizing Work With Dispatch Semaphores

The underlying idea of a dispatch semaphore isn't difficult to understand. Remember that a semaphore is nothing more than a variable that can be incremented and decremented in a thread safe manner. The most challenging aspect of a dispatch semaphore is correctly using it. Working in a multithreaded environment is complex. Semaphores help you manage that complexity.

Purchase Course

Purchase Mastering Grand Central Dispatch and access it whenever you want and for as long as you want.

Join Cocoacasts Plus

Join Cocoacasts Plus and access every 350+ tutorials including Mastering Grand Central Dispatch.