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

asp.net - Change the driver in the connection string to a data source in VB.Net -

Getting started consuming web services in a Ruby on Rails 3 application -

objective c - iPhone and it's wireless area -