Was this page helpful?

ElasticPriorityThreadPool Class

    Table of contents
    1. 1. Remarks
    2. 2. Members
      1. 2.1. Constructors
      2. 2.2. Fields
      3. 2.3. Properties
      4. 2.4. Methods
    Table of Contents
    public class ElasticPriorityThreadPool
    Namespace: MindTouch.Threading
    Assembly: mindtouch.dream
    Type Hierarchy:
    • object
      • ElasticPriorityThreadPool
    Implements:
    ElasticPriorityThreadPool provides a thread pool that can have a variable number of threads going from a minimum number of reserved threads to a maximum number of parallel threads.

    Remarks

    The threads are obtained from the DispatchThreadScheduler and shared across all other clients of the DispatchThreadScheduler. Obtained threads are released automatically if the thread pool is idle for long enough. Reserved threads are never released.

    Members

    Constructors

    Visibility Description
    Public ElasticPriorityThreadPool(int minReservedThreads, int maxParallelThreads, int maxPriority) Creates a new ElasticPriorityThreadPool instance.

    Fields

    Visibility Description
    Public MAX_RESERVED_THREADS Maximum number of threads that can be reserved by a single instance.

    Properties

    Visibility Description
    Public MinReservedThreads Number of minimum reserved threads.
    Public MaxParallelThreads Number of maxium parallel threads.
    Public ThreadCount Number of threads currently used.
    Public WorkItemCount Number of items pending for execution.
    Public MaxPriority Max priority for work items.
    Public this[int priority] Accessor for prioritized dispatch queue.

    Methods

    Visibility Description
    Public Dispose() Shutdown the ElasticThreadPool instance. This method blocks until all pending items have finished processing.
    Public ToString() (Override) Convert the dispatch queue into a string.
    Public Equals(object obj) (Inherited from Object)
    Public GetHashCode() (Inherited from Object)
    Public GetType() (Inherited from Object)
    Protected MemberwiseClone() (Inherited from Object)
    Was this page helpful?
    Tag page
    You must login to post a comment.

    Copyright © 2011 MindTouch, Inc. Powered by