The difference between thread start () and run () in

Each thread has a task to be performed. Task processing logical thread may be directly implemented or invoked by the class method Tread run example method, so

run () method entry corresponding to the task thread processing logic, it is called directly by the Java virtual machine running in the respective thread, not called by the application code.

The role of start () is to initiate the corresponding thread. Start a thread is actually request the Java virtual machine running the corresponding thread, when the thread can run is determined by the thread scheduler. start () call does not mean the end of the corresponding thread has been running, the thread may run later, it may never run.

The difference between thread start () and run (): The reference article

Published 958 original articles · won praise 68 · views 220 000 +

Guess you like

Origin blog.csdn.net/Dontla/article/details/104820827