Пример #1
0
 @Override
 public void run() {
   while (true) {
     try {
       outputer.output1("yangnn");
       Thread.sleep(20);
     } catch (Exception e) {
       e.printStackTrace();
     }
   }
 }
Пример #2
0
 @Override
 public void run() {
   // lock.lock();
   while (true) {
     try {
       outputer.output2("menghh");
       Thread.sleep(20);
     } catch (Exception e) {
       e.printStackTrace();
     }
   }
   // finally{
   // lock.unlock();
   // }
 }