I have an async method being called from with Parallel.For code below. Now looking at the code it is pretty straight forward with the exception JsonParse class has an static method all it does is calls the web service to download json string and converts that to an PairResults object and returns.
The issue I am having is the Parallel.For loop never exits, I can clearly see the data is coming from the webcall "item.part1=data.value" all working fine, but updateAllResults never finishes. What am I doing wrong?
public void updateAllResults()
{
Parallel.For(0, PairList.Count(), (i) =>
{
var item = PairList[i];
var data = (Parse.JsonParse<PairResults>
.getJsonString("http://localhost:22354/"
+ item.Original)).Result;
item.part1 = data.value;
});
}
async (i) =>andawaitwithout the.Resultcall.