public void run() {
        System.out.println("taskLauncher run");
      while (!Thread.interrupted()) {
        try {
          TaskInstance taskIns;
          synchronized (tasksToLaunch) {
            while (tasksToLaunch.isEmpty()) {
              tasksToLaunch.wait();
            }
            //get the TIP
            
            taskIns = tasksToLaunch.remove(0);
            System.out.println("taskLauncher get new task "+taskIns.getTask().getTaskId());
            
          }
          //wait for a slot to run
          woker.getFreeSlot();

          
          //got a free slot. launch the task
          startNewTask(taskIns);
        } catch (InterruptedException e) { 
          return; // ALL DONE
        } catch (Throwable th) {
          
        }
      }
    }