code: public static void unqueue(Task task) {
      if(THREAD != null) {
        synchronized(THREAD) {
          THREAD.queue.remove(task);
        }
      }
    }
docs: Remove a pending task from the queue.
  
  @param task Task to remove.