c# - How to run n Task and keep the order of them -


i have method listen communication channel.

each package have put in concurrent queue , call task.run handle input.

the handle method create new task concurrentqueue trydequeue , on package ( take first queue input ).

how can keep order of task ? how can sure task1 handle package1 handled , finish task before task2 handle package2 , finish task ?

there can scenario task1 take package1 , task2 take package2 task2 finish running before task1 ... , must avoid.

how ?


Comments

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -