code: private static Runnable nextTask() {
  		synchronized (lock) {
  			// Block until we have another object in the queue to execute.
  			while (taskList.isEmpty()) {
  				try {
  					lock.wait();
  				} catch (InterruptedException ie) {
  				}
  			}
  			return (Runnable) taskList.removeLast();
  		}
  	}
docs: Return the next task in the queue. If no task is available, this method
  will block until a task is added to the queue.
  
  @return a <code>Task</code> object