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 - Overriding methods in the brightness adjustment coordination subclass

We have created the algorithm coordination subclass, we have added the variables, properties, and methods needed for the brightness adjustment algorithm.

Now, we are going to fill in the gaps overriding the necessary methods to define the code for creating and coordinating the pieces. Thus, we are going to represent the complete brightness adjustment algorithm:

  1. Stay in the project, ImageBrowser.
  2. Move to the BrightnessAdjustment : ParallelAlgorithm class code area.
  3. Override the StartThreadsAsync method to force a garbage collection before starting the threads with an asynchronous execution:
    public override void StartThreadsAsync() { // Call the garbage collector ...

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