Larry Brister
asked on
.Net void multi-threading
I have a winforms app I inherited
In effect it opens with a task scheduler
Runs a sub (void) and closes
The SendMail void effectively sends 10,000 emails from a list it gets in SQL Server and send on to a providers smtp
That Provider allows 10,000 in a send....
But there can be multiple sends going on at the same time.
Is there a way to run the SendMail void in 5 separate "threads" so that 50k are being sent?
SendMail(IsLive)
Me.Close()
In effect it opens with a task scheduler
Runs a sub (void) and closes
The SendMail void effectively sends 10,000 emails from a list it gets in SQL Server and send on to a providers smtp
That Provider allows 10,000 in a send....
But there can be multiple sends going on at the same time.
Is there a way to run the SendMail void in 5 separate "threads" so that 50k are being sent?
SendMail(IsLive)
Me.Close()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
a task scheduler? what version of .net are you using?
ASKER
Eric,
50,000 at the same time in a "timeframe"
Pawel
.Net 4.5
50,000 at the same time in a "timeframe"
Pawel
.Net 4.5
you can try to wrap your code in task as shown by my article and launch your tasks
ASKER
Very nice
or just launch your job from the task scheduler 5 times with a parameter to process a different set of records in each instance