< prev index next >

src/java.base/share/classes/java/lang/ThreadGroup.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1995, 2012, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 1995, 2019, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 25,35 **** package java.lang; import java.io.PrintStream; import java.util.Arrays; - import jdk.internal.misc.VM; /** * A thread group represents a set of threads. In addition, a thread * group can also include other thread groups. The thread groups form * a tree in which every thread group except the initial thread group --- 25,34 ----
*** 423,433 **** private int enumerate(Thread list[], int n, boolean recurse) { int ngroupsSnapshot = 0; ThreadGroup[] groupsSnapshot = null; synchronized (this) { if (destroyed) { ! return 0; } int nt = nthreads; if (nt > list.length - n) { nt = list.length - n; } --- 422,432 ---- private int enumerate(Thread list[], int n, boolean recurse) { int ngroupsSnapshot = 0; ThreadGroup[] groupsSnapshot = null; synchronized (this) { if (destroyed) { ! return n; } int nt = nthreads; if (nt > list.length - n) { nt = list.length - n; }
*** 557,567 **** private int enumerate(ThreadGroup list[], int n, boolean recurse) { int ngroupsSnapshot = 0; ThreadGroup[] groupsSnapshot = null; synchronized (this) { if (destroyed) { ! return 0; } int ng = ngroups; if (ng > list.length - n) { ng = list.length - n; } --- 556,566 ---- private int enumerate(ThreadGroup list[], int n, boolean recurse) { int ngroupsSnapshot = 0; ThreadGroup[] groupsSnapshot = null; synchronized (this) { if (destroyed) { ! return n; } int ng = ngroups; if (ng > list.length - n) { ng = list.length - n; }
< prev index next >