I have an application that I need to separate into 5 different threads of execution where those threads will live for as long as the main application is alive. What I am thinking is that there is a main application that will start up 5 separate threads
and each one of those threads will create the objects that they need to work. Each of the 5 threads will be performing continuous activity throughout the life of the main application. I also need the main application to maintain the list
of operating threads so that it may send information to each thread as needed.
My first thought is to have a list object in the main application that will hold references to the 5 threads as each thread is created. Each thread will startup to do work and the main application will periodically send information to the individual
threads using the list object to get a reference to individual threads.
What I am looking for is some general help and maybe some code samples on how to accomplish this? Or maybe even a suggestion on a better approach if somebody has another thought.
View the full article
and each one of those threads will create the objects that they need to work. Each of the 5 threads will be performing continuous activity throughout the life of the main application. I also need the main application to maintain the list
of operating threads so that it may send information to each thread as needed.
My first thought is to have a list object in the main application that will hold references to the 5 threads as each thread is created. Each thread will startup to do work and the main application will periodically send information to the individual
threads using the list object to get a reference to individual threads.
What I am looking for is some general help and maybe some code samples on how to accomplish this? Or maybe even a suggestion on a better approach if somebody has another thought.
View the full article