Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;

public class Main {
    static final List<ThreadLocal> locals = new CopyOnWriteArrayList<>();

    static <T> ThreadLocal<T> createThreadLocal() {
        ThreadLocal<T> tl = new ThreadLocal<>();
        locals.add(tl);
        return tl;
    }
}