You can watch this episode by subscribing to Cocoacasts Plus.

Mastering Grand Central Dispatch

Synchronizing Work With Dispatch Semaphores

Download Your Free Copy of
The Missing Manual
for Swift Development

The Guide I Wish I Had When I Started Out

Join 20,000+ Developers Learning About Swift Development

Download Your Free Copy

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.

Instant and Unlimited Access
to 400+ Cocoacasts Tutorials


$19 / month

Pay Once a Month
30 Day Money Back Guarantee


$8.25 / month (billed annually)

Pay Once a Year and Save $129
30 Day Money Back Guarantee
Access to All Books