Can I use the same process in multiple threads?
There are 5 categories:
- 1 category – 100000 mail send
- 2 category – 10000 mail send
- 3 category – 200000 mail send
- 4 category – 1000 mail send
- 5 category – 300000 mail send
that are using two threads.
Thread time to send mail for each cateogry: [Thread 1] Took 40 mins for category 1; [Thread 2] took 10 mins for category 2
[Category 3] should be picked up by Thread 2 and after that randomly taking other categories. I am using Asp.net with Window service in backgorund process.
This is the method to get the mail detail : SendNewsLatterStatus
so that [Category 3] is continuing with Thread 2 and after that randomly taking
category in Thread ..
In asp.net with Window service in backgorund process.
NewsLatterThread1 = new Thread(new ThreadStart(SendNewsLatterStatus));
NewsLatterThread1.Name = "NewsLatter1";
NewsLatterThread2 = new Thread(new ThreadStart(SendNewsLatterStatus));
NewsLatterThread2.Name = "NewsLatter2";
NewsLatterThread1.Start();
NewsLatterThread2.Start();
NewsLatterThread1.Join();
NewsLatterThread2.Join();
NewsLatterThread1.Abort();
NewsLatterThread2.Abort();
It’s not properly working what is the mistake for that
You need to first clear out your concept of threading.
Read this http://www.albahari.com/threading/
This will surely clear air as well as will sort out your query.