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

Passing parameters to threads

So far, we have used the BackgroundWorker component combined with the Thread class to provide a fast execution and UI feedback. How can we combine multiple Thread class instances with many BackgroundWorker components to create an application that runs as fast as possible in modern computer architectures?

We can work with dynamic lists and the Environment.ProcessorCount property to create threads on the fly according to the available cores or processors. However, we need some technique to distribute the SMS messages that must be encrypted to the many encrypting threads. At the same time, we must provide feedback through many BackgroundWorker components. It sounds complex and it is complex.

To achieve this goal, we must ...

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