Multi tasking Ask Question
By   Junaid A     22-Apr-2024    2

Step 1

 private void ParseRss(NewsCategory categoryItem)
{
// get rss link
}


Step 2

    upadate rss using task.wait all

public void PorcessNews()
{

      var newsCategoryList = _storedb.NewsCategories.ToList();

                Task.WaitAll((from product in newsCategoryList
                              select Task.Run(() => ParseRss(product))).ToArray());

              //  PriceMatchLogger.Debug("NewsParser.Parse: News  parsing complete");

                _storedb.SaveChanges();
}
 

Solutions


10334
Copyright Future Minutes © 2015- 2024 All Rights Reserved.   Terms of Service  |   Privacy Policy |  Contact US|  Pages|  Whats new?
Update on: Dec 20 2023 05:10 PM
03
07

New Messages

George Floyd
  • Edit Post Edit This Post within a Hour
  • Hide Chat Hide This Post
  • Delete Chat If inappropriate Post By Mistake
  • Report Inappropriate Chat
  • 4.5kb
  • Hi James! Please remember to buy the food for tomorrow! I’m gonna be handling the gifts and Jake’s gonna get the drinks
  • Hi James! Please remember to buy the food for tomorrow! I’m gonna be handling the gifts and Jake’s gonna get the drinks
  • Hi James! Please remember to buy the food for tomorrow! I’m gonna be handling the gifts and Jake’s gonna get the drinks