code: public void close(long timeout) throws InterruptedException {
          synchronized (mPool) {
              mClosed = true;
              mPool.notifyAll();
              
              if (timeout != 0) {
                  if (timeout < 0) {
                      while (mActive > 0) {
                          // Infinite wait for notification.
                          mPool.wait(0);
                      }
                  }
                  else {
                      long expireTime = System.currentTimeMillis() + timeout;
                      while (mActive > 0) {
                          mPool.wait(timeout);
                          if (System.currentTimeMillis() > expireTime) {
                              break;
                          }
                      }
                  }
              }
          }
  
          interrupt();
      }
docs: Will close down all the threads in the pool as they become
  available. If all the threads cannot become available within the
  specified timeout, any active threads not yet returned to the
  thread pool are interrupted.
  
  @param timeout Milliseconds to wait before unavailable threads
  are interrupted. If zero, don't wait at all. If negative, wait forever.