code: public void setMaxRequestCount(int maxRequestCount) {
          this.maxRequestCount = maxRequestCount;
          while (!taskQueue.isEmpty() && (activeRequestCount < maxRequestCount || maxRequestCount < 0)) {
              if(!runQueuedTask(false)) {
                  break;
              }
          }
      }
docs: Sets the maximum number of requests that can be active at a time.
  <p/>
  If this is higher that the number of currently running requests the no new requests
  will be able to run until the number of active requests has dropped below this level.
  
  @param maxRequestCount The max request count