I have a .NET 3.5 Windows Service. I\'m testing with a small application that just sleeps threads after starting them, for random timespans of 300 to 6500ms. I have various
Definitely not Backgroundworker for a service
You should go with Tasks in the System.Threading.Tasks namespace, could also use tasks Parallel threading execution
http://msdn.microsoft.com/en-us/library/dd460717.aspx
I quote: "Starting with the .NET Framework 4, the TPL is the preferred way to write multithreaded and parallel code."
Some readings:
http://msdn.microsoft.com/en-us/library/dd997413%28VS.100%29.aspx
Start here:
http://msmvps.com/blogs/brunoboucard/archive/2010/04/09/parallel-programming-task-oriented-parallel-part-1.aspx
http://msmvps.com/blogs/brunoboucard/archive/2010/05/18/parallel-programming-in-c-4-0-task-oriented-parallel-programming-part-2.aspx
http://msmvps.com/blogs/brunoboucard/archive/2010/11/06/parallel-programming-with-c-4-0-part-3.aspx
More examples
http://www.dotnetcurry.com/ShowArticle.aspx?ID=489
http://www.dotnetfunda.com/articles/article984-parallel-compting-in-csharp-40-.aspx