public static void exec(Runnable task){
  if (isCurrent()) {
    task.run();
  }
 else {
    nextTick(task);
  }
}

public static void exec ( Runnable task ) { if ( isCurrent ( ) ) { task . run ( ) ; } else { nextTick ( task ) ; } }
executes a task in eventthread .
