Code example for ArrayDeque

Methods: poll

0
                scheduleNext(); 
            } 
        } 
 
        protected synchronized void scheduleNext() { 
            if ((mActive = mTasks.poll()) != null) {
                THREAD_POOL_EXECUTOR.execute(mActive);
            } 
        } 
    } 
 
    /** 
     * Indicates the current status of the task. Each status will be set only once 
     * during the lifetime of a task. 
     */ 
    public enum Status { 
        /** 
         * Indicates that the task has not been executed yet. 
         */ 
        PENDING,
        /**