BackgroundWorker
From Wikipedia, the free encyclopedia
BackgroundWorker is a utility class developed by Microsoft for the Windows Forms library as a part of the .NET Framework.
Calling time-consuming code directly from the GUI classes will work, but it will perform in the same thread as the main GUI thread, so if the method needs time to perform, the GUI will freeze during this time.
BackgroundWorker is useful when a time-consuming task has to be performed following a user-interaction event, as it execute the code in another background thread before returning the result to the main GUI thread.
[edit] See Also
- SwingWorker, the equivalent Java class
- Windows.Forms