I\'m trying to use a progress dialog, while filling a datagrid, but I get the following error: \"Only the original thread that created a view hierarchy can touch its views\", th
why not use Task instead?
Task.Run(() => doStuff("hello world"));
It doesn't really seem a lot better, but at least it doesn't have an unused identifier.
Note: Task.Run() is .Net 4.5 or later. If you're using .Net 4 you have to do:
Task.Factory.StartNew(() => doStuff("hello world"));
Both of the above do use the thread pool.