Sai Swami wrote:Hi Jolly Ranchers,
I have an app that reads from one db and stores in another db. there are 500000 records. i want multiple threads to do the reading and insertion.
how can i control the number of threads spawned? can anyone please throw some light on the design ?
thanks
~Sai
Since you can spawn the threads with the
Thread class -- I guess you can decide how many threads to spawn. As for getting the threads to exit, that is cooperative -- you'll have to code the threads to exit, when you want them to.
Henry