src/share/classes/java/lang/Thread.java

Print this page

        

*** 227,237 **** /* The object in which this thread is blocked in an interruptible I/O * operation, if any. The blocker's interrupt method should be invoked * after setting this thread's interrupt status. */ private volatile Interruptible blocker; ! private Object blockerLock = new Object(); /* Set the blocker field; invoked via sun.misc.SharedSecrets from java.nio code */ void blockedOn(Interruptible b) { synchronized (blockerLock) { --- 227,237 ---- /* The object in which this thread is blocked in an interruptible I/O * operation, if any. The blocker's interrupt method should be invoked * after setting this thread's interrupt status. */ private volatile Interruptible blocker; ! private final Object blockerLock = new Object(); /* Set the blocker field; invoked via sun.misc.SharedSecrets from java.nio code */ void blockedOn(Interruptible b) { synchronized (blockerLock) {
*** 686,705 **** */ if (threadStatus != 0) throw new IllegalThreadStateException(); /* Notify the group that this thread is about to be started ! * so that it can be added to the group's list of threads. */ group.threadStarting(this); ! boolean failed = true; try { start0(); ! failed = false; } finally { try { ! group.threadStarted(this, failed); } catch (Throwable ignore) { /* do nothing. If start0 threw a Throwable then it will be passed up the call stack */ } } --- 686,708 ---- */ if (threadStatus != 0) throw new IllegalThreadStateException(); /* Notify the group that this thread is about to be started ! * so that it can be added to the group's list of threads ! * and the group's unstarted count can be decremented. */ group.threadStarting(this); ! boolean started = false; try { start0(); ! started = true; } finally { try { ! if (!started) { ! group.threadStartFailed(this); ! } } catch (Throwable ignore) { /* do nothing. If start0 threw a Throwable then it will be passed up the call stack */ } }