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); }
public Package(ParallelWorker inst, int workerIndex) { this.inst = inst; this.workerIndex = workerIndex; }