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

Time for action - Creating a specialized parallel algorithm coordination subclass to run concurrently with the pool of threads

We have the pieces (instances of ParallelAlgorithmPiece), but now we must create the subclass to build and solve the brightness adjustment algorithm.

We are going to create a subclass of the ParallelAlgorithm class and add the variables, properties, and methods needed for the brightness adjustment algorithm:

  1. Stay in the project, ImageBrowser.
  2. Create a new class, BrightnessAdjustment (a subclass of ParallelAlgorithm), using the following declaration:
    class BrightnessAdjustment : ParallelAlgorithm
    
  3. Add the following lines of code at the beginning. We are going to use the System.Drawing classes:
    using System.Drawing;
    
  4. Add the following ...

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