コード例 #1
0
 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 };
 }
コード例 #2
0
ファイル: ThreadPool.cs プロジェクト: yisea123/NetmfSTM32
        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
            };
        }