code: public static void addTask(Runnable task, int priority) {
  		synchronized (lock) {
  			taskList.addFirst(task);
  			// Notify the worker threads. The notifyAll() methods notifies all
  			// threads waiting on this object.
  			lock.notifyAll();
  		}
  	}
docs: Adds a task to the task queue. The task will be executed immediately
  provided there is a free worker thread to execute it. Otherwise, it will
  execute as soon as a worker thread becomes available.
  <p>
  
  The priority of the task can be specified and must be one of the
  following values:
  <ul>
  <li>Thread.MAX_PRIORITY
  <li>Thread.NORM_PRIORITY
  <li>Thread.MIN_PRIORITY
  </ul>
  
  @param task
  the task to execute