Why do you recommend that the main thread be the last to finish? In an application, a program continues to run until all of the threads have ended. Hence, the main thread to finish at last is not a requirement. It is a good programming practice to make it to run last to finish. The application execution starts by invoking main thread and the chain follows. So it is inevitable that all the threads complete their execution. Soon after the completion of the execution the control returns to main thread. Thus the flow will not be missed. And it is the main thread that starts first and also ends first.
|