class xxx implements Runnable{
   Pool pool=new Pool();
    public void run(){
       while (true) {
          try {
              synchronized (pool) {
                 while (pool.isEmpty()) {
                     pool.wait();
                    }                   
                 key = (object) pool.remove0;         
                 }           
                opt(key);                
            }
            catch (Exception e) {
            }
        }    public static void put(object key) {
      synchronized (pool) {
             pool.add(key);
             pool.notifyAll();
           }
        selector.wakeup(); 
    }  opt(object key){
}
}
那位大哥知道,这们的代码怎样用原子锁可以实现