public synchronized int clear ( ) { final int count = taskQueue . size ( ) ; for ( final TaskEntity task : taskQueue ) { canceledTasks . add ( task ) ; } taskQueue . clear ( ) ; return count ; }
Clear the pending list .