Wait and notify program using Read Write Lock