Multi threading which would be the best to use? (Threadpool or threads)

前端 未结 7 1590
醉梦人生
醉梦人生 2021-01-07 02:52

Hopefully this is a better question than my previous. I have a .exe which I will be passing different parameters (file paths) to which it will then take in and parse. So I w

7条回答
  •  孤独总比滥情好
    2021-01-07 03:14

    If you're targeting the .Net 4 framework the Parallel.For or Parallel.Foreach are extremely helpful. If those don't meet your requirements I've found the Task.Factory to be useful and straightforward to use as well.

提交回复
热议问题