In iOS, what are dispatch groups?
Anoniem
These are used when you have a number of things you need to accomplish that can happen all at once, but you need to wait for them all to finish before doing something else. Semaphores do the same thing, but they are much more general. Both operations have to be thread safe.