public static void Open(int nofThreads) { Contract.Requires(nofThreads > 0); threads = new Thread[nofThreads]; var i = 0; while (i != nofThreads) { threads[i] = new Thread(Run); threads[i].Priority = ThreadPriority.Lowest; i = i + 1; } workItemQueue = new BoundedQueue { Capacity = nofThreads }; }
public static void Open(int nofThreads) { Contract.Requires(nofThreads > 0); threads = new Thread[nofThreads]; var i = 0; while (i != nofThreads) { threads[i] = new Thread(Run); threads[i].Priority = ThreadPriority.Lowest; i = i + 1; } workItemQueue = new BoundedQueue { Capacity = nofThreads }; }