我需要处理多个函数并执行返回相同类型记录的结果。 我使用C#在Visual Studio 2010中 考虑我具备的功能有:C#中的并行处理/并行编程
class Search{
public list<wrecords> GetrecordsofAAA(string term);
public list<wrecords> GetrecordsofBBB(string term);
public list<wrecords> GetrecordsofCCC(string term);
}
和IM调用函数这样
list<wrecords> records1 = Search.GetrecordsofAAA(heart);
list<wrecords> records2 = Search.GetrecordsofBBB(heart);
list<wrecords> records3 = Search.GetrecordsofCCC(heart);
这是一系列的处理。
如果可能,我需要同时填写records1,records2和records3。
更多的工作描述,而不是一个问题.... –
查看任务类:http://msdn.microsoft.com/en-us/library/system.threading.tasks.task.aspx – FuleSnabel
你有没有研究过线程/ TPL概念? – Zenwalker