120 * <p><blockquote><pre>
121 * PrimeRun p = new PrimeRun(143);
122 * new Thread(p).start();
123 * </pre></blockquote>
124 * <p>
125 * Every thread has a name for identification purposes. More than
126 * one thread may have the same name. If a name is not specified when
127 * a thread is created, a new name is generated for it.
128 * <p>
129 * Unless otherwise noted, passing a {@code null} argument to a constructor
130 * or method in this class will cause a {@link NullPointerException} to be
131 * thrown.
132 *
133 * @author unascribed
134 * @see Runnable
135 * @see Runtime#exit(int)
136 * @see #run()
137 * @see #stop()
138 * @since JDK1.0
139 */
140 public
141 class Thread implements Runnable {
142 /* Make sure registerNatives is the first thing <clinit> does. */
143 private static native void registerNatives();
144 static {
145 registerNatives();
146 }
147
148 private char name[];
149 private int priority;
150 private Thread threadQ;
151 private long eetop;
152
153 /* Whether or not to single_step this thread. */
154 private boolean single_step;
155
156 /* Whether or not the thread is a daemon thread. */
157 private boolean daemon = false;
158
159 /* JVM state */
|
120 * <p><blockquote><pre>
121 * PrimeRun p = new PrimeRun(143);
122 * new Thread(p).start();
123 * </pre></blockquote>
124 * <p>
125 * Every thread has a name for identification purposes. More than
126 * one thread may have the same name. If a name is not specified when
127 * a thread is created, a new name is generated for it.
128 * <p>
129 * Unless otherwise noted, passing a {@code null} argument to a constructor
130 * or method in this class will cause a {@link NullPointerException} to be
131 * thrown.
132 *
133 * @author unascribed
134 * @see Runnable
135 * @see Runtime#exit(int)
136 * @see #run()
137 * @see #stop()
138 * @since JDK1.0
139 */
140 @sun.misc.Contended
141 public
142 class Thread implements Runnable {
143 /* Make sure registerNatives is the first thing <clinit> does. */
144 private static native void registerNatives();
145 static {
146 registerNatives();
147 }
148
149 private char name[];
150 private int priority;
151 private Thread threadQ;
152 private long eetop;
153
154 /* Whether or not to single_step this thread. */
155 private boolean single_step;
156
157 /* Whether or not the thread is a daemon thread. */
158 private boolean daemon = false;
159
160 /* JVM state */
|