Is there a problem with this type of implementation to wait for a batch of threads to complete before moving on, given the following circumstances?:
- CCR or PFX cannot be used.
- Customer.Prices collection and newCustomer are NOT being mutated.
- CloneCustomerPrices performs a deep copy on each of the prices in Customer.Prices collection into a new price Collection.
public List[Customer] ProcessCustomersPrices(List [Customer] Customers) { [Code to check Customers and deep copy Cust data into newCustomers] List[Thread] ThreadList = new List[Thread](); foreach(Customer cust in Customers) { ThreadList.Add(new Thread(() => CloneCustomerPrices(cust.Prices, newCustomer))); } Action runThreadBatch = () => { ThreadList.ForEach(t => t.Start()); ThreadList.All (t => t.Join([TimeOutNumber])); }; runThreadBatch(CopyPriceModelsCallback, null); [More Processing] return newCustomers; }