HttpThread thread = new HttpThread(http, HttpThreadPool.this, "HttpThread_" + number);
HttpThread thread = new HttpThread(http, HttpThreadPool.this, threadName);
	protected void adjustThreadCount() {		if (adjusting > 0) {			adjusting--;			return;		}		int active = activeThreads.size();		int idle = idleThreads.size();		int count = idle + active;		if (Http.DEBUG) {			http.logDebug("Current thread count: " + idle + " idle, " + active + " active"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$		}		if (idle < 2) {			count += 5;		} else {			if (idle > 10) {				count -= 5;			}		}		if (count > upper) {			count = upper;		}		if (count < lower) {			count = lower;		}		int delta = count - (idle + active);		if (Http.DEBUG) {			http.logDebug("New thread count: " + count + ", delta: " + delta); //$NON-NLS-1$ //$NON-NLS-2$		}		if (delta < 0) /* remove threads */		{			delta = -delta; /* invert sign */			if (delta < idle) {				for (int i = idle - 1; delta > 0; i--, delta--) {					HttpThread thread = (HttpThread) idleThreads.elementAt(i);					idleThreads.removeElementAt(i);					thread.close();				}			} else {				hitCount += delta - idle;				for (int i = 0; i < idle; i++) {					HttpThread thread = (HttpThread) idleThreads.elementAt(i);					thread.close();				}				idleThreads.removeAllElements();			}		} else {			if (delta > 0) /* add threads */			{				adjusting = delta; /* new threads will call this method */				if (delta > hitCount) {					delta -= hitCount;					hitCount = 0;					idleThreads.ensureCapacity(count);					for (int i = 0; i < delta; i++) {						number++;						try {							AccessController.doPrivileged(new PrivilegedAction() {								public Object run() {									HttpThread thread = new HttpThread(http, HttpThreadPool.this, "HttpThread_" + number); //$NON-NLS-1$									thread.start(); /* thread will add itself to the pool */									return null;								}							});						} catch (RuntimeException e) {							/* No resources to create another thread */							http.logError(NLS.bind(HttpMsg.HTTP_THREAD_POOL_CREATE_NUMBER_ERROR, new Integer(number)), e);							number--;							/* Readjust the upper bound of the thread pool */							upper -= delta - i;							break;						}					}				} else {					hitCount -= delta;				}			}		}	}