先看一段我们team leader 写的代码(工作五六年了),我不想吐槽了,自己看看!
for (int j = 0; j < matchedJobs.Length; j++) { asy[j] = ThreadJobs; asyncResult[j] = asy[j].BeginInvoke(dataCollection, matchedJobs[j], jobResults, sLotStepSeq, checkReqResultError[j], executedJobList, null, null); } for (int k = 0; k < asy.Length; k++)//必须asy全部处理完成才能往下进行 { asy[k].EndInvoke(asyncResult[k]); }
时间: 2024-09-29 10:53:43