public BaseWorkTask dequeue() throws InterruptedException {
		synchronized (mQueue) {
			//if there are no more tasks in the queue, wait...
			while (!isShutdown() && mQueue.isEmpty()) {
				mQueue.wait();
			}

			if (mQueue.isEmpty()) {
				isOverFlow = false;
				return null;
			} else {
				final BaseWorkTask result = (BaseWorkTask) mQueue.get(0);
				mQueue.remove(result);
				//if low threshhold reached, signal producer to add tasks
				if (isOverFlow && mQueue.size() <= PRODUCE_THRESHHOLD * queueSize) {
					isOverFlow = false;
					mQueue.notifyAll();	//in case maxThreshhold thread waiting;  moved from outside immediate if statement to here
				}
				return result;
			}
		}
	}