code: public Task poll() {
          Task result = taskList[activeIndex].poll();
          if (result != null) {
              if (activeIndex == 0)
                  result.removeFromQueue0();
              else
                  result.removeFromQueue1();
          }
  
          return result;
      }
docs: Retrieves the task with earliest dead line and removes it from queue.
  
  @return task which has earliest dead line