@Override public void run() { while (true) { try { outputer.output1("yangnn"); Thread.sleep(20); } catch (Exception e) { e.printStackTrace(); } } }
@Override public void run() { // lock.lock(); while (true) { try { outputer.output2("menghh"); Thread.sleep(20); } catch (Exception e) { e.printStackTrace(); } } // finally{ // lock.unlock(); // } }