@@ -0,0 +1,983 @@
+package reentrantlock;%0A%0Aimport java.util.concurrent.locks.Condition;%0Aimport java.util.concurrent.locks.ReentrantLock;%0A%0Apublic class ReenterLockCondition implements Runnable %7B%0A    private static ReentrantLock lock = new ReentrantLock();%0A    private static Condition condition = lock.newCondition();%0A%0A    @Override%0A    public void run() %7B%0A        try %7B%0A            lock.lock();%0A            System.out.println(%22locking...%22);%0A            condition.await();%0A            System.out.println(%22going on...%22);%0A        %7D catch (InterruptedException e) %7B%0A            e.printStackTrace();%0A        %7D finally %7B%0A            lock.unlock();%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) throws InterruptedException %7B%0A        ReenterLockCondition reenterLockCondition=new ReenterLockCondition();%0A%0A        Thread thread=new Thread(reenterLockCondition);%0A        thread.start();%0A%0A        Thread.sleep(1000);%0A%0A        lock.lock();%0A        condition.signal();%0A        lock.unlock();%0A%0A    %7D%0A%7D%0A

add reentrantLock 重入锁 Condition