static void invokeOnThreadInThreadPool(Groupable channel,Runnable task){
  boolean invokeDirect;
  GroupAndInvokeCount thisGroupAndInvokeCount=myGroupAndInvokeCount.get();
  AsynchronousChannelGroupImpl targetGroup=channel.group();
  if (thisGroupAndInvokeCount == null) {
    invokeDirect=false;
  }
 else {
    invokeDirect=(thisGroupAndInvokeCount.group == targetGroup);
  }
  try {
    if (invokeDirect) {
      task.run();
    }
 else {
      targetGroup.executeOnPooledThread(task);
    }
  }
 catch (  RejectedExecutionException ree) {
    throw new ShutdownChannelGroupException();
  }
}

static void invokeOnThreadInThreadPool ( Groupable channel , Runnable task ) { boolean invokeDirect ; GroupAndInvokeCount thisGroupAndInvokeCount = myGroupAndInvokeCount . get ( ) ; AsynchronousChannelGroupImpl targetGroup = channel . group ( ) ; if ( thisGroupAndInvokeCount == null ) { invokeDirect = false ; } else { invokeDirect = ( thisGroupAndInvokeCount . group == targetGroup ) ; } try { if ( invokeDirect ) { task . run ( ) ; } else { targetGroup . executeOnPooledThread ( task ) ; } } catch ( RejectedExecutionException ree ) { throw new ShutdownChannelGroupException ( ) ; } }
invokes the given task on the thread pool associated with the given channel . if the current thread is in the thread pool then the task is invoked directly .
