O'Reilly logo

C# 2008 and 2005 Threaded Programming: Beginner's Guide by Gastón C. Hillar

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

BackgroundWorker creation on the fly

In the previous chapters, we were talking about the ideal situation, consisting of the alignment between the number of cores or processors available and the number of threads into which a process is divided, in order to achieve the best possible performance, according to hardware resources. As we can see, the BackgroundWorker is a very noble component, and helps us a lot when we need a simple way to create new threads and control certain aspects of their behavior, as well as provide feedback about the component's progress to the user interface. However, as we have developed the examples inserting the BackgroundWorker components in design time, we should find a way to create many of them dynamically in runtime. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required