A thread is a thread of execution in a program.
Multiple threads of execution may be running
concurrently.
Constructor
Creates new thread.
Constants
Methods
Returns the name of this thread.
Returns the priority setting for this thread.
Interrupts this thread, possibly generating
Interrupted, or InterruptedIO exception in currently
pending operation in this thread.
Checks if this thread has been interrupted.
Interrupted status is cleared when this method is called.
Checks if this thread is still alive.
Checks if this thread is marked as daemon.
Checks if this thread has been interrupted.
Interrupted status is NOT cleared when this method is called.
Thread join()
Waits indefinitly for this thread to terminate.
Thread join(
int millis)
Waits at most specified milliseconds for this thread to terminate.
Thread join(
int millis,
int nanos)
Waits at most specified milli- and nanoseconds for this thread to terminate.
| Throws |
Interrupted -
if another thread has interrupted the current thread.
|
Sets the daemon status of this thread.
| Throws |
BadState -
If this thread is active
|
Sets the name of this thread.
Sets the priority for this thread.
Starts the execution of thread.
| Throws |
BadState -
If thread is already started
|