@Override
    public Thread newThread(Runnable r) {
        Thread t = new Thread(group, r,
                namePrefix + THREAD_NUMBER.getAndIncrement(),
                0);
        if (this.isDaemon) {
            t.setDaemon(true);
        } else {
            if (t.isDaemon()) {
                t.setDaemon(false);
            }
        }

        if (t.getPriority() != Thread.NORM_PRIORITY) {
            t.setPriority(Thread.NORM_PRIORITY);
        }
        return t;
    }
company: www.dtstack.com
author: sishu.yss
create: 2018/09/12
core/src/main/java/com/dtstack/flink/sql/factory/DTThreadFactory.java