public void execute(AbortableTask task){
  AbortingRunnable ar=new AbortingRunnable(task);
  tasks.add(ar);
  try {
    exec.execute(ar);
  }
 catch (  RejectedExecutionException e) {
    tasks.remove(ar);
    throw e;
  }
}

public void execute ( AbortableTask task ) { AbortingRunnable ar = new AbortingRunnable ( task ) ; tasks . add ( ar ) ; try { exec . execute ( ar ) ; } catch ( RejectedExecutionException e ) { tasks . remove ( ar ) ; throw e ; } }
executes the task using the embedded executor .
