public synchronized void executeNextTask() {
		// System.out.println("HIT");
		if (this.m_TaskQueue.size() > 0) {

			for (int i = 0; i < this.m_Threads.size(); i++) {
				DCThread thread = this.m_Threads.get(i);
				// System.out.println("Got thread: " + thread.getThreadId());
				if (thread.getThreadState() == THREAD_STATE.FREE) {
					// System.out.println("HIT3");
					try {
						Task mTask = getNextTask();

						if (mTask == null) {
							// System.out.println("No tasks in task queue.");
							return;
						}

						System.out.println("Giving task " + mTask.getTaskId()
								+ " to thread " + thread.getThreadId());

						thread.addTask(mTask);

						thread.startThread(false);
						// thread.startThread(false);
					} catch (final NullPointerException e) {

					}
				} else {
					// System.out.println("Bing Bong");
				}
			}
		}
	}