/// <summary> /// Creates a new instance of the <see cref="WorkQueue"/> class. /// </summary> public WorkQueue() { queue = new HighPriorityQueue(); }
/// <summary> /// Creates a new instance of the <see cref="WorkThreadPool"/> class with the /// specified <see cref="MinThreads"/> and <see cref="MaxThreads"/>. /// </summary> /// <param name="minThreads"> /// The mininum number of threads. /// </param> /// <param name="maxThreads"> /// The maximum number of threads. /// </param> /// <seealso cref="Default"/> public WorkThreadPool(int minThreads, int maxThreads) { if (0 >= maxThreads) throw new ArgumentOutOfRangeException("maxThreads", maxThreads, "Must be greater than zero."); workQueue = new HighPriorityQueue(); workers = new ArrayList(maxThreads); this.maxThreads = maxThreads; MinThreads = minThreads; }
public static HighPriorityQueue Syncronized(HighPriorityQueue P) { return(new HighPriorityQueue(ArrayList.Synchronized(P.InnerList), P.Comparer, false)); }
public static HighPriorityQueue Syncronized(HighPriorityQueue P) { return new HighPriorityQueue(ArrayList.Synchronized(P.InnerList),P.Comparer,false); }