void () { synchronized (threadsUnderIndicator) { boolean hasCanceledIndicator = !threadsUnderCanceledIndicator.isEmpty(); ourCheckCanceledBehavior = !hasCheckCanceledHooks() && !hasCanceledIndicator ? CheckCanceledBehavior.NONE : hasCanceledIndicator ? CheckCanceledBehavior.INDICATOR_PLUS_HOOKS : CheckCanceledBehavior.ONLY_HOOKS; } }