0
I’m developing a project and I think I’m going to need multithreading.
While starting a thread new doesn’t seem difficult, I can’t understand if I have to finish the thread or she ends up alone.
My application will, in certain hours make a, or several, jobs that may take some time. As I did not want to postpone the process, since one of the most important parts of the project is the "agenda", I thought to do the various works 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 was being done on thread ends, I need to destroy the thread? Or she herself, when she’s done, destroys herself?
Why I’m so worried. The programme is supposed to run for a long time, days at least and if it does not manage this process the stability of the programme would be at stake.
Did any of the answers solve your question? Do you think you can accept one of them? Check out the [tour] how to do this, if you haven’t already. You would help the community by identifying what was the best solution for you. You can accept only one of them. But you can vote on any question or answer you find useful on the entire site.
– Maniero