await() { if (received != messages.length) { try { wait(); } catch (InterruptedException e) {} } System.out.println(Thread.currentThread().getName() + ": mailbox: notification received"); }
synchronized void await() { if (received != messages.length) { try { wait(); } catch (InterruptedException e) {} } Thread current = Thread.currentThread(); String name = current instanceof Task ? ((Task)current).getTaskName() : "Main "; System.out.println(name + ": mailbox: notification received"); }
   await() {       if (received != messages.length) {	   try { wait(); } catch (InterruptedException e) {}       }       System.out.println(Thread.currentThread().getName() + ": mailbox: notification received");   }