January 13, 2006

Threading using the ThreadPool

Use something along the lines:
System.Threading.ThreadPool.QueueUserWorkItem(
new System.Threading.WaitCallback(MyThreadRoutine), stateObject);
where 'stateObject' is an object which is passed as a parameter to the thread routine 'MyThreadRoutine'
For a generic version look here

No comments: