getId() 获取线程的id
yield()
sleep
start
run
stop
interrupt:Interrupts this thread.
interrupted:静态方法,返回当前的线程的是否有interrupt信号,调用的就是isInterrupted
isInterrupted
isAlive
suspend <---> resume
setPriority Changes the priority of this thread.
isInterrupted
join
dumpStack()
setDaemon
checkAccess
关于几个状态
NEW:Thread state for a thread which has not yet started.
RUNNABLE:state is executing in the Java virtual machine but it may be waiting for other resources
BLOCKED : blocked waiting for a monitor lock to enter a synchronized block/method or reenter a synchronized block/method after calling
WAITING:A thread is in the waiting state due to calling one of the following methods :wait join LockSupport
TIMED_WAITING : Thread.sleep join(long) wait(long)
TERMINATED:thread has completed execution.