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

Print this page

        

*** 668,677 **** --- 668,678 ---- * @since JDK1.0 * @deprecated This method is inherently deadlock-prone. See * {@link Thread#suspend} for details. */ @Deprecated + @SuppressWarnings("deprecation") public final void suspend() { if (stopOrSuspend(true)) Thread.currentThread().suspend(); }
*** 680,689 **** --- 681,691 ---- * boolean argument) all of the threads in this thread group and its * subgroups, except the current thread. This method returns true * if (and only if) the current thread is found to be in this thread * group or one of its subgroups. */ + @SuppressWarnings("deprecation") private boolean stopOrSuspend(boolean suspend) { boolean suicide = false; Thread us = Thread.currentThread(); int ngroupsSnapshot; ThreadGroup[] groupsSnapshot = null;
*** 729,738 **** --- 731,741 ---- * <tt>Thread.suspend</tt> and <tt>ThreadGroup.suspend</tt>, * both of which have been deprecated, as they are inherently * deadlock-prone. See {@link Thread#suspend} for details. */ @Deprecated + @SuppressWarnings("deprecation") public final void resume() { int ngroupsSnapshot; ThreadGroup[] groupsSnapshot; synchronized (this) { checkAccess();