How can I synchronize one thread to start only after another thread has finished?
Sigiloso
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.