protected void returnToTaskQueue ( boolean sourcesReady ) { if ( sourcesReady ) { // If we've done something meaningful, go ahead and return ourselves to the queue immediately m_taskQueue . offer ( this ) ; } else { // Otherwise, avoid spinning too aggressively, so wait a millisecond before requeueing VoltDB . instance ( ) . scheduleWork ( new ReturnToTaskQueueAction ( ) , 1 , - 1 , TimeUnit . MILLISECONDS ) ; } }
or after waiting a few milliseconds