查看最大线程数: cat /proc/sys/kernel/threads-max ulimit User limits - limit the use of system-wide resources. Syntaxulimit [-acdfHlmnpsStuv] [limit] Options -S Change and report the soft limit associated with a resource. -H Change and report the hard limit
使用线程池与不使用线程池的差别 先来看一下使用线程池与不适应线程池的差别,第一段代码是使用线程池的: public static void main(String[] args) { long startTime = System.currentTimeMillis(); final List<Integer> l = new LinkedList<Integer>(); ThreadPoolExecutor tp = new ThreadPoolExecutor(100, 100
1.join public class JoinThreadTest extends Thread { public JoinThreadTest(String name){ super(name); } @Override public void run() { for(int i = 0; i < 100; i++){ System.out.println(getName() + " " + i); } } public static void main(String[] a