private void checkTasks ( ) { if ( currentTask == null ) { Handler < Task > task = queue . poll ( ) ; if ( task != null ) { currentTask = new Task ( this ) ; task . handle ( currentTask ) ; } } }
Starts the next task if necessary .