linux - pthread_exit() and initial thread -


When I use pthread_exit () in the initial thread, the initial thread is switched to the end position.

itemprop = "text">

In pthreads, Unless a thread is running, the process will survive.

So yes, you can have a walking process, though the initial thread is out.

One thing that can be confusing to you is that when the initial thread returns from the main (). This is equivalent to exit from calling () so if the main () returns, your process will end. But if the initial thread is called pthread_exit () and other threads are still alive, then your process will survive.


Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -