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 - Defining new methods for running many times

The NASA scientists want to run your old star finder application in batch mode, processing all the images found in a hard disk folder, using your powerful parallel algorithm. You need to make some changes to the original application to allow this to happen. However, you have never run intensive multithreaded algorithms many times. Will you have memory problems? You trust the C# garbage collector when you program applications.

First, we are going to create a new method for processing an individual bitmap. This way, we will be able to call it many times for each bitmap found in a folder:

  1. Stay in the project, OldStarsFinder.
  2. Add the following procedure, FindOldStarsAndShowResult. It will ...

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