@Override
    public Thread newThread(Runnable r) {
        Thread t = new Thread(group, r, namePrefix + threadNumber.getAndIncrement(), 0);

        if (t.isDaemon()) {
            t.setDaemon(false);
        }

        if (t.getPriority() != Thread.NORM_PRIORITY) {
            t.setPriority(Thread.NORM_PRIORITY);
        }

        return t;
    }
An implementation of {@link ThreadFactory} that is based off of the default implementation in the java libraries
except that it inserts a custom name instead of a pool number. The name is also sequenced with a number to allow
for multiple pools with the same name to be created and still be distinguishable from each other. A threadsafe cache
is used to keep track of the sequence number for any given name.
aws-java-sdk-core/src/main/java/com/amazonaws/util/NamedDefaultThreadFactory.java