I have an application that needs to perform some background work, i.e. Logging, wich must not block the main thread. How would I basically design such a scenario It is obvious that I should do that on an extra thread but I think it is a bad idea to spawn a new thread everytime a log-message is written and let it die once the message was written. But how do I keep a thread alive and trigger the log-messages and pass the string to that thread Also, should I give that thread a lower priority Maybe there is a best practise for this kind scenario

doing some work in the background occasionally
VoiceOfExperience
Have a look on this too!
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=847014&SiteID=1
I hope this will help you in getting Started!
Best Regards,
TheJet
Background Worker is highly recommended to use in performing background tasks if you are using .Net 2.0!
See MSDN Documents for more details!
Best Regards,
JCakeC
Use BackgroundWorker Componenet in .Net 2.0 to do any asyncrhonous operation on background without effecting the min thread's execution and your applications performance!
I hope this will help!
Best Regards,
cheston
Yes Background worker can work in anytype of .Net application and sorry for that typing Mistake ""effecting min thread's execution"" I wrote Main's Thread, Means it wont block your application's Main Thread!
Best Regards,
Talonstryk
thorlax402