tcp/IQ Thread Pool
tcp/IQ Thread Pool is a .Net component for the efficient and elegant management of
multiple threads in a .Net application.
The Problem
The .Net Framework provides thread creation and advanced synchronisation functionality
but once multiple threads are running there is no native functionality for the suspension
or abortion of a collection of threads. This problem is often seen in WinForms applications
that may spider the internet, send emails or solve problems that are inherently suited to a
multi threaded solution. In such applications the user needs to be given a 'Stop' or 'Pause'
button that will terminate or suspend all running threads.
Faced with such a problem, a developer may create an array or other collection that tracks
running threads. When Stop is pressed the collection can be traversed and a Thread.Abort()
issued to all the running threads.
Such a solution on the surface seems robust but it is pocketed with a number of problems.
The developer must be careful to protect the collection that tracks the running threads to
ensure against a number of concurrency issues. In addition, issuing Thread.Abort() to
terminate threads is arguably
a programmatic mortal sin that can leave the application,
operating system or associated database in an unknown or unacceptable state.
By underestimating the possible problems the developer may integrate the thread
tracking code into the rest of the solution rather than encapsulate it into its own
class. This may lead to an unmanageable code in which concurrency issues are difficult to solve.
The Solution
To solve these problems with the tracking, suspension and termination of multiple threads,
tcpIQ has developed the
tcpIQ Thread Pool.
Levering the efficiency of the .Net Thread Pool class, the tcpIQ Thread Pool allows the developer
to create any number of worker threads (more than the maximum 25 threads allowed by the .Net
Framework), and then to issue a command to elegantly terminate all running threads. The
thread termination occurs without the need to issue a Thread.Abort() and therefore avoids
its associated problems. The application, operating system or database are guaranteed to be
left in a predefined state.
What you get
The tcpIQ Thread Pool comes with the binary DLL, a number of examples, a
comprehensive on-line Help that is integrated with Visual Studio and is backed by tcpIQ's
great support.
Evaluation and Registration
By default the tcpIQ Thread Pool runs in an evaluation mode. It will display an evaluation
message at random times when the component is constructed. Once purchased, you will be sent
two registration numbers that can be passed into the constructor of the tcpIQ Thread Pool. This
prevents the evaluation message from being displayed and will uniquely identify you as being
the registered user of the tcpIQ Thread Pool.
-- The tcpIQ Team
Download
tcpIQ Thread Pool Download
|