protected Executable getJobImpl ( ) throws InterruptedException { // While the queue is empty, wait(); // when notified take an event from the queue and return it. while ( m_currentJob == null ) { wait ( ) ; } // This one is the job to return JobItem item = m_currentJob ; // Go on to the next object for the next call. m_currentJob = m_currentJob . m_next ; return item . m_job ; }
Never call this method only override in subclasses to perform job getting in a specific way normally tied to the data structure holding the jobs .