How to modify the following code and make it runs multiple tasks concurrently?
foreach (SyndicationItem item in CurrentFeed.Items)
{
if (m_bDownloadInterrupted)
break;
await Task.Run( async () =>
{
// do some downloading and processing work here
await DoSomethingAsync();
}
}
I also need to make interruption and stop the process possible. Because my DoSomethingAsync method reads the tag (a global boolean value) to stop the process.
Thanks