Exemplo n.º 1
0
  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;
  }
Exemplo n.º 2
0
 public boolean isActive() {
   return state.isActive();
 }
Exemplo n.º 3
0
 public boolean isActive() {
   return _state.isRunning();
 }