Parallel.For items in a List by using ConcurrentQueue - will this work?
问题 I have a List<TaskClass> TaskList items that we can iterate over using a Parallel loop. The items in the list are sorted in a particular order as the TaskClass implements IComparable with its own CompareTo(object obj) method. Thus we need the items acted upon in sequential order. Note they do NOT have to complete in sequential order, just start in sequential. Thus TaskList[0] should be started first; then TaskList[1], TaskList[2], ... However, we don't care if TaskList[2] completes first, or