presto-main/src/main/java/io/prestosql/execution/resourcegroups/InternalResourceGroup.java/InternalResourceGroup/isEligibleToStartNext
class InternalResourceGroup:    private boolean isEligibleToStartNext()
    {
        checkState(Thread.holdsLock(root), "Must hold lock");
        synchronized (root) {
            if (!canRunMore()) {
                return false;
            }
            return !queuedQueries.isEmpty() || !eligibleSubGroups.isEmpty();
        }
    }