Attaching Continuation Tasks to the UI Thread

added by BlackWasp
1/4/2012 10:30:27 AM

3 Kicks, 178 Views

Parallel tasks can be used in Windows Forms and Windows Presentation Foundation applications to run slow processes without blocking the user interface thread. However, this presents a problem, as both systems prevent other threads from updating controls.


1/4/2012 10:29:59 AM
This is much cleaner than the BackgroundWorker approach I usually take.

1/4/2012 2:29:02 PM
I think so too. It's only available in .NET 4.0 though so earlier versions still need to use BackgroundWorkers or spawn new threads.