Click or drag to resize

DomainThreadPool Class

A pool of threads, having a specific number of threads available and waiting.

This implementation assures a specified number of threads and allow assigning specific tasks to specific threads.

When a specific number of tasks has to synchronize at certain points, the same specific number of threads is required running at the same time.

If one task has to follow another in a number of parallel "pipelines", it is required to assign specific tasks to specific threads.

Inheritance Hierarchy
SystemObject
  DHI.Mike1D.GenericDomainThreadPool

Namespace:  DHI.Mike1D.Generic
Assembly:  DHI.Mike1D.Generic (in DHI.Mike1D.Generic.dll) Version: 19.0.0.0 (11.1.1.1111)
Syntax
public class DomainThreadPool

The DomainThreadPool type exposes the following members.

Constructors
  NameDescription
Public methodDomainThreadPool
Create a threadpool with the specified number of threads
Top
Methods
  NameDescription
Public methodAssingTask
Assign task to thread, activate thread if it is waiting

You need to call Start before any tasks will be processed.

Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Protected methodFinalize
Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Protected methodMemberwiseClone
Creates a shallow copy of the current Object.
(Inherited from Object.)
Public methodStart
Start all threads. Can only be called once.
Public methodStop
Stop all threads. Threads cannot be started again.
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
See Also