Looping Async Task List in C#

后端 未结 4 1171
半阙折子戏
半阙折子戏 2021-01-22 07:26

I am trying to parse data from several websites continuously. I would like this action to be preformed individually in a loop in an asynchronous manner until the program is clos

4条回答
  •  一向
    一向 (楼主)
    2021-01-22 07:57

    Did you tried the PLinq lib?

    Plinq allows you to execute linq querys async.

    In your case it would look like:

    SiteList.AsParallel().ForEach(s => s.ParseData);

提交回复
热议问题