public void addTaskAndWakeup ( Runnable task ) { taskQueue . add ( task ) ; if ( selectMode != SELECT_NOW ) { selector . wakeup ( ) ; } }
Adds a task to be executed by the NioThread and wakes up the selector so that it will eventually pick up the task .