I'm developing a project and I think I'll need multithreading .
While starting a new thread does not seem difficult, I can not seem to figure out if I have to finish the thread or it ends alone.
My application will, at certain times, make one, or several jobs that may take some time. Since I did not want to postpone the process, since one of the most important parts of the project is the "agenda", I thought about doing the various jobs in threads . So, even if a job is taking longer, the main application would be available to run other jobs at the same time.
Once the work that was being done on the thread ends, do I need to destroy the thread ? Or does it, when it's done, destroy itself?
Because of my concern. The program is supposed to run for a long time, days at a minimum and if you do not manage this process the stability of the program would be concerned.