PsiElement () { ProgressIndicatorProvider.checkCanceled(); // We hope this method is being called often enough to cancel daemon processes smoothly PsiElement wrapper = myWrapper; if (wrapper != null) return wrapper; wrapper = createPsiNoLock(); return myWrapperUpdater.compareAndSet(this, null, wrapper) ? wrapper : Objects.requireNonNull(myWrapper); }