improved for create scheduler

This commit is contained in:
shaojin.wensj
2015-06-28 17:49:44 +08:00
parent 5d0a350e5c
commit cd260f2613
2 changed files with 6 additions and 7 deletions
@@ -1762,14 +1762,13 @@ public class DruidDataSource extends DruidAbstractDataSource
@Override
public void run() {
runInternal();
}
private void runInternal() {
for (;;) {
// addLast
try {
lock.lockInterruptibly();
} catch (InterruptedException e2) {
break;
}
lock.lock();
try {
// 必须存在线程等待,才创建连接
if (poolingCount >= notEmptyWaitThreadCount) {