System.out.println(name + ": flag: notification received"); } }
   await()      {      if (flag == true)         System.out.println(Thread.currentThread().getName() + ": flag: already set");      else   {         while (flag == false) {            try { wait(1000000); } catch (InterruptedException e) {}            if (flag == false)                   System.out.println(Thread.currentThread().getName() + ": flag: timed out");            }         System.out.println(Thread.currentThread().getName() + ": flag: notification received");         }      }