evosoft interview question

How would you synchronize two given threads?