Domanda di colloquio di Apple

Difference between semaphor, lock, and control variables.