[c# Multithreading] BackgroundWorker

Using Backgroundworker in application
 In CLR,  BackgroundWorker component provides a relatively simple way to run a separate thread of execution. In this demo, the basic process follows.
  • Declare two backgroundworker class ( for each task respectively)
  • Subcribe to two events of the backgroundworker instances.
  • when click on the start button, both of tasks will run in parallel
  • When both of tasks finish, the start button will be enabled.
For more information on backgroundworker class, see microsoft's document here:  


 Source code:( The demo has been writen in C# and WPF)

https://app.box.com/s/trv1sxziubhoi8taa0kj
Share on Google Plus

About Chien

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 comments:

Post a Comment