Commit cdc423f2 authored by yihua.huang's avatar yihua.huang

log

parent c6661899
...@@ -53,10 +53,11 @@ public class ThreadPool { ...@@ -53,10 +53,11 @@ public class ThreadPool {
} }
} }
threadAlive++; threadAlive++;
System.out.println(threadAlive);
executorService.execute(runnable); executorService.execute(runnable);
} finally { } finally {
condition.notify();
threadAlive--; threadAlive--;
condition.signal();
reentrantLock.unlock(); reentrantLock.unlock();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment