Asynchronous algorithms

In this tutorial we will discover the concept of using user defined algorithms with the classes from the ILNumerics.Algorithms namespace. In the synchronous algorithms tutorial we already discovered the concepts of implementing synchronous algorithms with ILNumerics.Net. This tutorial will demonstrate how to write and implement asynchronous algorithms with the ILAsyncAlgorithm class.

The ILAsyncAlgorithm class should be used as base class for

  • long running algorithms
  • algorithms which must support user interaction like cancellation, algorithm suspending and -resuming
  • algorithms firing events compatible with the System.Windows.Forms controls threading model

ILAsyncAlgorithm is an abstract base class for all asynchronous algorithms. Using it brings the following advantages:

  • ILAsyncAlgorithm derives from ILMath. Therefore all functions of ILMath are directly adressed from within member functions of ILAsyncAlgorithm and its derivates without the ILMath identifier.
  • ILAsyncAlgorithm implements an intuitive eventing model which can be used to inform users of the class about state and progress of the algorithm - optional in their own threading context which will be important to directly interact with Windows.Forms controls froom within handler functions of algorithm events.
  • ILAsyncAlgorithm execute in a seperated thread and provide functions for flow control.

The next sections will help users of ILAsyncAlgorithm using and accessing implementations of algorithms. Implementors of ILAsyncAlgorithms will learn the steps needed to implement their own user defined asynchronous algorithm classes.

Read about the following topics:


Valid CSS! Valid XHTML 1.0 Transitional