Pergunta de entrevista da empresa Elbit Systems

How can I synchronize one thread to start only after another thread has finished?

Resposta da entrevista

Sigiloso

15 de set. de 2025

I synchronized the threads using a semaphore so the second thread started only after the first had finished. I initialized the semaphore with zero permits, which caused the second thread to wait until the first thread released a permit after completing its work.

Glassdoor | Glassdoor