Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import java.util.concurrent.Executors;

import java.util.concurrent.ThreadFactory;

public class Main {
    protected static ThreadFactory tdfContainer;

    public static Thread newThread(Runnable r) {
        return getThreadFactory().newThread(r);
    }

    protected static synchronized ThreadFactory getThreadFactory() {
        return null != tdfContainer ? tdfContainer : (tdfContainer = Executors.defaultThreadFactory());
    }
}