コード例 #1
0
        public IEnumerator StartTask()
        {
            Task[] vs  = tasks;
            int    len = vs.Length;

            ParallelWorker e = new ParallelWorker(len);

            for (int x = 0; x < len; x++)
            {
                vs[x] = Task.Factory.StartNew(SubThread, new Package(e, x));
            }

            return(e);
        }
コード例 #2
0
 public Package(ParallelWorker inst, int workerIndex)
 {
     this.inst        = inst;
     this.workerIndex = workerIndex;
 }