View Javadoc
1   package ch.hslu.exercises.sw06.ex1;
2   
3   
4   public final class DemoWaitPool {
5   
6       private static final Object LOCK = new Object();
7   
8       public static void main(final String args[]) throws InterruptedException {
9           synchronized (LOCK) {
10              final MyTask waiter = new MyTask(LOCK);
11              new Thread(waiter).start();
12              Thread.sleep(1000);
13              Thread.yield();
14              LOCK.notify();
15          }
16      }
17  }