+ synchronized(this) {
+ if (runnable==null)
+ synchronized(ThreadPool.this) {
+ /* if the idle array is full, just let ourselves die */
+ if (numIdleThreads > minIdleThreads && numThreads > minThreads) return;
+ /* otherwise put ourselves back in the pool and release anybody who is waiting */
+ idleThreads[numIdleThreads++] = this;
+ ThreadPool.this.notifyAll();
+ }
+ }