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

Print this page




 216 
 217     private static synchronized long nextThreadID() {
 218         return ++threadSeqNumber;
 219     }
 220 
 221     /**
 222      * The argument supplied to the current call to
 223      * java.util.concurrent.locks.LockSupport.park.
 224      * Set by (private) java.util.concurrent.locks.LockSupport.setBlocker
 225      * Accessed using java.util.concurrent.locks.LockSupport.getBlocker
 226      */
 227     volatile Object parkBlocker;
 228 
 229     /* The object in which this thread is blocked in an interruptible I/O
 230      * operation, if any.  The blocker's interrupt method should be invoked
 231      * after setting this thread's interrupt status.
 232      */
 233     private volatile Interruptible blocker;
 234     private final Object blockerLock = new Object();
 235 
 236     /* Set the blocker field; invoked via sun.misc.SharedSecrets from java.nio code

 237      */
 238     void blockedOn(Interruptible b) {
 239         synchronized (blockerLock) {
 240             blocker = b;
 241         }
 242     }
 243 
 244     /**
 245      * The minimum priority that a thread can have.
 246      */
 247     public final static int MIN_PRIORITY = 1;
 248 
 249    /**
 250      * The default priority that is assigned to a thread.
 251      */
 252     public final static int NORM_PRIORITY = 5;
 253 
 254     /**
 255      * The maximum priority that a thread can have.
 256      */




 216 
 217     private static synchronized long nextThreadID() {
 218         return ++threadSeqNumber;
 219     }
 220 
 221     /**
 222      * The argument supplied to the current call to
 223      * java.util.concurrent.locks.LockSupport.park.
 224      * Set by (private) java.util.concurrent.locks.LockSupport.setBlocker
 225      * Accessed using java.util.concurrent.locks.LockSupport.getBlocker
 226      */
 227     volatile Object parkBlocker;
 228 
 229     /* The object in which this thread is blocked in an interruptible I/O
 230      * operation, if any.  The blocker's interrupt method should be invoked
 231      * after setting this thread's interrupt status.
 232      */
 233     private volatile Interruptible blocker;
 234     private final Object blockerLock = new Object();
 235 
 236     /* Set the blocker field; invoked via jdk.internal.misc.SharedSecrets
 237      * from java.nio code
 238      */
 239     void blockedOn(Interruptible b) {
 240         synchronized (blockerLock) {
 241             blocker = b;
 242         }
 243     }
 244 
 245     /**
 246      * The minimum priority that a thread can have.
 247      */
 248     public final static int MIN_PRIORITY = 1;
 249 
 250    /**
 251      * The default priority that is assigned to a thread.
 252      */
 253     public final static int NORM_PRIORITY = 5;
 254 
 255     /**
 256      * The maximum priority that a thread can have.
 257      */