DISQUS

Community Page on DISQUS

what is this?

Jump to original thread »
Author

ASP.NET MVC & Threads

Started by eibrahim · 3 months ago

I have a method that handles sending of emails.  I wrote it so that it would run asynchronously, so that it won’t slow down the web app.  It looks like this:

protected static void SendMail(string to, string subject, string body)
{
try
%7 ... Continue reading »

1 comment

  • Emad, BackgroundWorker is designed just for Windows apps AFAIK. Also with your updated code you run the risk of running out of threads if you just create them on the fly like that. I would suggest you use ThreadPool.QueueUserWorkItem()

Add New Comment

Returning? Login