I am just learning about the new Threading and Parallel libraries in .Net 4
In the past I would create a new Thread like so (as an example):
DataInTh
The task gives you all the goodness of the task API:
Task.ContinueWith
)Note that in both cases you can make your code slightly simpler with method group conversions:
DataInThread = new Thread(ThreadProcedure);
// Or...
Task t = Task.Factory.StartNew(ThreadProcedure);