Pergunta de entrevista da empresa Optiver

One question about using semaphone to achieve threads synchronization.