The difference between start () and run () of - 16.Thread (b)

Create a thread: Thread thread = new Thread ();

Then the main () method,

Thread.run (); simply calls an ordinary method, and does not start another thread, the program would be executed in the order of the corresponding code.

thread.start (); it means re-open a thread, without waiting for other threads to run to completion, so long as a CPU to run the thread.

Guess you like

Origin www.cnblogs.com/EricShen/p/11411835.html