我想使用 PLINQ 在产品和类别之间执行内部连接。但我不确定是否应该为这两个集合调用 AsParallel 方法。
// PLINQ - Option 1
jointTables = from c in Homework02.categories.AsParallel()
join p in Homework02.productList on c.Name equals p.Category
select new { Category = c, Product = p };
// PLINQ - Option 2
jointTables = from c in Homework02.categories.AsParallel()
join p in Homework02.productList.AsParallel() on c.Name equals p.Category
select new { Category = c, Product = p };