void (CompletionResult item) { Ref<Boolean> stopRef = new Ref<>(Boolean.FALSE); DumbModeAccessType.RELIABLE_DATA_ONLY.ignoreDumbMode(() -> { stopRef.set(!myLookup.addItem(item.getLookupElement(), item.getPrefixMatcher())); }); if (stopRef.get()) { return; } myArranger.setLastLookupPrefix(myLookup.getAdditionalPrefix()); //noinspection NonAtomicOperationOnVolatileField myCount++; // invoked from a single thread if (myCount == myUnfreezeAfterNItems) { showLookupAsSoonAsPossible(); } if (myLookupAppearancePolicy == LookupAppearancePolicy.ON_FIRST_POSSIBILITY && myLookup.getShownTimestampMillis() == 0L) { AppExecutorUtil.getAppScheduledExecutorService().schedule(myFreezeSemaphore::up, 0, TimeUnit.MILLISECONDS); openLookupLater(); } else { if (myCount == 1) { AppExecutorUtil.getAppScheduledExecutorService().schedule(myFreezeSemaphore::up, ourInsertSingleItemTimeSpan, TimeUnit.MILLISECONDS); } myQueue.queue(myUpdate); } }