private T getAndClearUnderLock ( ) throws Throwable { if ( error != null ) { throw error ; } else { // Return and clear current T retValue = data ; data = null ; return retValue ; } }
Get and clear the slot - MUST be called while holding the lock!!