public boolean start() { if (!state.isStopped()) return false; state = State.STARTING; forkThreads(minSize); while (works.size() < minSize) { Thread.yield(); try { Thread.sleep(100); } catch (Exception exp) { } } state = State.RUNNING; if (log.isDebugEnabled()) log.debug("Thread Pool【" + name + "】Start Success。,size=" + minSize); // 线程池启动成功 return true; }
public boolean isActive() { return state.isActive(); }
public boolean isActive() { return _state.isRunning(); }