Lines Matching defs:Thread

53  * some thread creates a new <code>Thread</code> object, the new
74 * declare a class to be a subclass of <code>Thread</code>. This
76 * <code>Thread</code>. An instance of the subclass can then be
80 * class PrimeThread extends Thread {
103 * <code>Thread</code>, and started. The same example in this other
122 * new Thread(p).start();
141 class Thread implements Runnable {
150 private Thread threadQ;
203 * Thread ID
264 public static native Thread currentThread();
344 * Initializes a Thread.
346 * @param g the Thread group
348 * @param name the name of the new Thread
358 Thread parent = currentThread();
413 * Throws CloneNotSupportedException as a Thread can not be meaningfully
414 * cloned. Construct a new Thread instead.
425 * Allocates a new {@code Thread} object. This constructor has the same
426 * effect as {@linkplain #Thread(ThreadGroup,Runnable,String) Thread}
429 * {@code "Thread-"+}<i>n</i>, where <i>n</i> is an integer.
431 public Thread() {
432 init(null, null, "Thread-" + nextThreadNum(), 0);
436 * Allocates a new {@code Thread} object. This constructor has the same
437 * effect as {@linkplain #Thread(ThreadGroup,Runnable,String) Thread}
440 * {@code "Thread-"+}<i>n</i>, where <i>n</i> is an integer.
447 public Thread(Runnable target) {
448 init(null, target, "Thread-" + nextThreadNum(), 0);
452 * Allocates a new {@code Thread} object. This constructor has the same
453 * effect as {@linkplain #Thread(ThreadGroup,Runnable,String) Thread}
456 * {@code "Thread-"+}<i>n</i>, where <i>n</i> is an integer.
474 public Thread(ThreadGroup group, Runnable target) {
475 init(group, target, "Thread-" + nextThreadNum(), 0);
479 * Allocates a new {@code Thread} object. This constructor has the same
480 * effect as {@linkplain #Thread(ThreadGroup,Runnable,String) Thread}
486 public Thread(String name) {
491 * Allocates a new {@code Thread} object. This constructor has the same
492 * effect as {@linkplain #Thread(ThreadGroup,Runnable,String) Thread}
510 public Thread(ThreadGroup group, String name) {
515 * Allocates a new {@code Thread} object. This constructor has the same
516 * effect as {@linkplain #Thread(ThreadGroup,Runnable,String) Thread}
526 public Thread(Runnable target, String name) {
531 * Allocates a new {@code Thread} object so that it has {@code target}
574 public Thread(ThreadGroup group, Runnable target, String name) {
579 * Allocates a new {@code Thread} object so that it has {@code target}
585 * #Thread(ThreadGroup,Runnable,String)} with the exception of the fact
612 * {@code Thread(ThreadGroup, Runnable, String)} constructor.
652 public Thread(ThreadGroup group, Runnable target, String name,
715 * Subclasses of <code>Thread</code> should override this method.
719 * @see #Thread(ThreadGroup, Runnable, String)
729 * This method is called by the system to give a Thread
791 * @see ThreadGroup#uncaughtException(Thread,Throwable)
792 * @see SecurityManager#checkAccess(Thread)
795 * Thread.stop causes it to unlock all of the monitors that it
811 * are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
855 * @see SecurityManager#checkAccess(Thread)
865 * are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
875 if ((this != Thread.currentThread()) ||
930 if (this != Thread.currentThread())
983 * Tests if some Thread has been interrupted. The interrupted state
1003 * Why are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
1042 * are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
1068 * are Thread.stop, Thread.suspend and Thread.resume Deprecated?</a>.
1187 * invokes the {@link java.lang.ThreadGroup#enumerate(Thread[])}
1210 public static int enumerate(Thread tarray[]) {
1236 * {@code notifyAll} on {@code Thread} instances.
1282 * {@code notifyAll} on {@code Thread} instances.
1393 * @see SecurityManager#checkAccess(Thread)
1411 return "Thread[" + getName() + "," + getPriority() + "," +
1414 return "Thread[" + getName() + "," + getPriority() + "," +
1420 * Returns the context ClassLoader for this Thread. The context
1424 * ClassLoader context of the parent Thread. The context ClassLoader of the
1436 * @return the context ClassLoader for this Thread, or {@code null}
1459 * Sets the context ClassLoader for this Thread. The context
1472 * the context ClassLoader for this Thread, or null indicating the
1495 * assert Thread.holdsLock(obj);
1546 if (this != Thread.currentThread()) {
1558 StackTraceElement[][] stackTraceArray = dumpThreads(new Thread[] {this});
1576 * of the corresponding <tt>Thread</tt>.
1592 * @return a <tt>Map</tt> from <tt>Thread</tt> to an array of
1607 public static Map<Thread, StackTraceElement[]> getAllStackTraces() {
1618 Thread[] threads = getThreads();
1620 Map<Thread, StackTraceElement[]> m = new HashMap<>(threads.length);
1655 if (cl == Thread.class)
1679 cl != Thread.class;
1701 private native static StackTraceElement[][] dumpThreads(Thread[] threads);
1702 private native static Thread[] getThreads();
1705 * Returns the identifier of this Thread. The thread ID is a positive
1753 * Thread state for a thread which has not yet started.
1758 * Thread state for a runnable thread. A thread in the runnable
1766 * Thread state for a thread blocked waiting for a monitor lock.
1775 * Thread state for a waiting thread.
1780 * <li>{@link #join() Thread.join} with no timeout</li>
1790 * that object. A thread that has called <tt>Thread.join()</tt>
1796 * Thread state for a waiting thread with a specified waiting time.
1800 * <li>{@link #sleep Thread.sleep}</li>
1802 * <li>{@link #join(long) Thread.join} with timeout</li>
1810 * Thread state for a terminated thread.
1832 * Interface for handlers invoked when a <tt>Thread</tt> abruptly
1862 void uncaughtException(Thread t, Throwable e);