Semphore in GCD

One of the often overlooked objects in Grand Central Dispatch (GCD) is dispatch_semaphore_t – they look weird and smell like legacy. However, semaphore is a useful tool hidden behind the glow of GCD’s sexy functions. Background Semaphores come to us from the late Edsger Dijkstra in the early years of computing. There are two flavors of semaphore – binary and counting. Our dispatch_semaphore_t is the more powerful counting semaphore. Therefore, let’s focus on how they work with an analogy.

Read more

About

I’m an iOS Software Engineer living in Minnesota, currently working at Field Nation. I enjoy creating immersive technology that leaves people with a magical feeling. A product is powerful when its features align the people who use it. The human-product connection is the focus of my work. At the moment, I like experimenting with Swift, ComponentKit and ReactiveCocoa. In the past, I have contracted projects for Boston Scientific(iPad) and HidrateSpark(iPhone & Watch).

Read more