Starting a background thread using the Threadpool

Here is a quick and easy way of starting a background process using the Threadpool by way of an inline delegate.

ThreadPool.QueueUserWorkItem(new WaitCallback(
delegate(object stateInfo)
{
    saveToDB();
}));         

Print | posted on Saturday, May 09, 2009 1:42 PM

Feedback

No comments posted yet.

Your comment:





 
 

Copyright © HanSolo

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski