当前位置: 动力学知识库 > 问答 > 编程问答 >

multithreading - How can i sort two integer arrays parallel with quick sort in C#?

问题描述:

I want to sort two arrays simultaneously. I am beginner in Parallelizing in c# and i want to know how i should do it, by Multithreading or something like that...

a1 and a2 are integer

quick_sort(a1,0,100);

quick_sort(a2,0,100);

how can i start these function at same time? please write the code for me

网友答案:

Sort both of these "simultaneously".

System.Threading.Tasks.Task.Run(() => quick_sort(a1,0,100));
System.Threading.Tasks.Task.Run(() => quick_sort(a2,0,100));
分享给朋友:
您可能感兴趣的文章:
随机阅读: