How to check possibility of deadlock in c# code
My application sometimes stop in the below code, not always but sometimes.
All the 3 methods CalcQuarterlyFigures, CalcWeeklyFigures & CalcMonthlyFigures return Task<List<MyClass>>.
Note, this runs inside a foreach loop.
List<Task> TaskList = new List<Task>();
if(i.DoCalculateAllHistory) {
var quarterly = CalcQuarterlyFigures(QuarterlyPrices, i.SeriesID);
TaskList.Add(quarterly);
var weekly = CalcWeeklyFigures(WeeklyPrices, i.SeriesID);
TaskList.Add(weekly);
var monthly = CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
TaskList.Add(monthly);
Task.WaitAll(TaskList.ToArray());
if(monthly.Result.Count > 0)
monthlyPerfFig.AddRange(monthly.Result);
if(weekly.Result.Count > 0)
weeklyPerfFig.AddRange(weekly.Result);
if(quarterly.Result.Count > 0)
quartPerfFig.AddRange(quarterly.Result);
} else {
monthlyPerfFig.AddRange(await CalcMonthlyFigures(MonthlyPrice, i.SeriesID));
}
Am I missing anything here that leads to dead lock ?
c# asynchronous task deadlock
|
show 1 more comment
My application sometimes stop in the below code, not always but sometimes.
All the 3 methods CalcQuarterlyFigures, CalcWeeklyFigures & CalcMonthlyFigures return Task<List<MyClass>>.
Note, this runs inside a foreach loop.
List<Task> TaskList = new List<Task>();
if(i.DoCalculateAllHistory) {
var quarterly = CalcQuarterlyFigures(QuarterlyPrices, i.SeriesID);
TaskList.Add(quarterly);
var weekly = CalcWeeklyFigures(WeeklyPrices, i.SeriesID);
TaskList.Add(weekly);
var monthly = CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
TaskList.Add(monthly);
Task.WaitAll(TaskList.ToArray());
if(monthly.Result.Count > 0)
monthlyPerfFig.AddRange(monthly.Result);
if(weekly.Result.Count > 0)
weeklyPerfFig.AddRange(weekly.Result);
if(quarterly.Result.Count > 0)
quartPerfFig.AddRange(quarterly.Result);
} else {
monthlyPerfFig.AddRange(await CalcMonthlyFigures(MonthlyPrice, i.SeriesID));
}
Am I missing anything here that leads to dead lock ?
c# asynchronous task deadlock
1
What is the environment? Full .NET Framework or .NET Core?Task.WaitAll(TaskList.ToArray());will possibly cause a deadlock in full .NET framework. Since you already usingawaitinelsecondition - use.WhenAll:await Task.WhenAll(TaskList.ToArray());
– Fabio
Jan 2 at 5:44
@Fabio my application is using.NET Framework 4.6.1.
– Pரதீப்
Jan 2 at 5:46
@Fabio Thanks, let me update the code and check. Application takes almost 1 full day to complete the full run. So it might take 24 hours to confirm if its working.
– Pரதீப்
Jan 2 at 5:47
@Fabio - I have a doubt. Isawaitin else condition is the problem orTask.WaitAll(TaskList.ToArray())is the problem ?
– Pரதீப்
Jan 2 at 5:50
If methodsCalcQuarterlyFigures,CalcWeeklyFiguresandCalcMonthlyFiguresare asynchronous thenTask.WaitAllis a problem. When you are using asynchronous methodsawaitis correct approach.
– Fabio
Jan 2 at 5:53
|
show 1 more comment
My application sometimes stop in the below code, not always but sometimes.
All the 3 methods CalcQuarterlyFigures, CalcWeeklyFigures & CalcMonthlyFigures return Task<List<MyClass>>.
Note, this runs inside a foreach loop.
List<Task> TaskList = new List<Task>();
if(i.DoCalculateAllHistory) {
var quarterly = CalcQuarterlyFigures(QuarterlyPrices, i.SeriesID);
TaskList.Add(quarterly);
var weekly = CalcWeeklyFigures(WeeklyPrices, i.SeriesID);
TaskList.Add(weekly);
var monthly = CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
TaskList.Add(monthly);
Task.WaitAll(TaskList.ToArray());
if(monthly.Result.Count > 0)
monthlyPerfFig.AddRange(monthly.Result);
if(weekly.Result.Count > 0)
weeklyPerfFig.AddRange(weekly.Result);
if(quarterly.Result.Count > 0)
quartPerfFig.AddRange(quarterly.Result);
} else {
monthlyPerfFig.AddRange(await CalcMonthlyFigures(MonthlyPrice, i.SeriesID));
}
Am I missing anything here that leads to dead lock ?
c# asynchronous task deadlock
My application sometimes stop in the below code, not always but sometimes.
All the 3 methods CalcQuarterlyFigures, CalcWeeklyFigures & CalcMonthlyFigures return Task<List<MyClass>>.
Note, this runs inside a foreach loop.
List<Task> TaskList = new List<Task>();
if(i.DoCalculateAllHistory) {
var quarterly = CalcQuarterlyFigures(QuarterlyPrices, i.SeriesID);
TaskList.Add(quarterly);
var weekly = CalcWeeklyFigures(WeeklyPrices, i.SeriesID);
TaskList.Add(weekly);
var monthly = CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
TaskList.Add(monthly);
Task.WaitAll(TaskList.ToArray());
if(monthly.Result.Count > 0)
monthlyPerfFig.AddRange(monthly.Result);
if(weekly.Result.Count > 0)
weeklyPerfFig.AddRange(weekly.Result);
if(quarterly.Result.Count > 0)
quartPerfFig.AddRange(quarterly.Result);
} else {
monthlyPerfFig.AddRange(await CalcMonthlyFigures(MonthlyPrice, i.SeriesID));
}
Am I missing anything here that leads to dead lock ?
c# asynchronous task deadlock
c# asynchronous task deadlock
asked Jan 2 at 4:45
Pரதீப்Pரதீப்
75.8k1279114
75.8k1279114
1
What is the environment? Full .NET Framework or .NET Core?Task.WaitAll(TaskList.ToArray());will possibly cause a deadlock in full .NET framework. Since you already usingawaitinelsecondition - use.WhenAll:await Task.WhenAll(TaskList.ToArray());
– Fabio
Jan 2 at 5:44
@Fabio my application is using.NET Framework 4.6.1.
– Pரதீப்
Jan 2 at 5:46
@Fabio Thanks, let me update the code and check. Application takes almost 1 full day to complete the full run. So it might take 24 hours to confirm if its working.
– Pரதீப்
Jan 2 at 5:47
@Fabio - I have a doubt. Isawaitin else condition is the problem orTask.WaitAll(TaskList.ToArray())is the problem ?
– Pரதீப்
Jan 2 at 5:50
If methodsCalcQuarterlyFigures,CalcWeeklyFiguresandCalcMonthlyFiguresare asynchronous thenTask.WaitAllis a problem. When you are using asynchronous methodsawaitis correct approach.
– Fabio
Jan 2 at 5:53
|
show 1 more comment
1
What is the environment? Full .NET Framework or .NET Core?Task.WaitAll(TaskList.ToArray());will possibly cause a deadlock in full .NET framework. Since you already usingawaitinelsecondition - use.WhenAll:await Task.WhenAll(TaskList.ToArray());
– Fabio
Jan 2 at 5:44
@Fabio my application is using.NET Framework 4.6.1.
– Pரதீப்
Jan 2 at 5:46
@Fabio Thanks, let me update the code and check. Application takes almost 1 full day to complete the full run. So it might take 24 hours to confirm if its working.
– Pரதீப்
Jan 2 at 5:47
@Fabio - I have a doubt. Isawaitin else condition is the problem orTask.WaitAll(TaskList.ToArray())is the problem ?
– Pரதீப்
Jan 2 at 5:50
If methodsCalcQuarterlyFigures,CalcWeeklyFiguresandCalcMonthlyFiguresare asynchronous thenTask.WaitAllis a problem. When you are using asynchronous methodsawaitis correct approach.
– Fabio
Jan 2 at 5:53
1
1
What is the environment? Full .NET Framework or .NET Core?
Task.WaitAll(TaskList.ToArray()); will possibly cause a deadlock in full .NET framework. Since you already using await in else condition - use .WhenAll: await Task.WhenAll(TaskList.ToArray());– Fabio
Jan 2 at 5:44
What is the environment? Full .NET Framework or .NET Core?
Task.WaitAll(TaskList.ToArray()); will possibly cause a deadlock in full .NET framework. Since you already using await in else condition - use .WhenAll: await Task.WhenAll(TaskList.ToArray());– Fabio
Jan 2 at 5:44
@Fabio my application is using
.NET Framework 4.6.1.– Pரதீப்
Jan 2 at 5:46
@Fabio my application is using
.NET Framework 4.6.1.– Pரதீப்
Jan 2 at 5:46
@Fabio Thanks, let me update the code and check. Application takes almost 1 full day to complete the full run. So it might take 24 hours to confirm if its working.
– Pரதீப்
Jan 2 at 5:47
@Fabio Thanks, let me update the code and check. Application takes almost 1 full day to complete the full run. So it might take 24 hours to confirm if its working.
– Pரதீப்
Jan 2 at 5:47
@Fabio - I have a doubt. Is
await in else condition is the problem or Task.WaitAll(TaskList.ToArray()) is the problem ?– Pரதீப்
Jan 2 at 5:50
@Fabio - I have a doubt. Is
await in else condition is the problem or Task.WaitAll(TaskList.ToArray()) is the problem ?– Pரதீப்
Jan 2 at 5:50
If methods
CalcQuarterlyFigures, CalcWeeklyFigures and CalcMonthlyFigures are asynchronous then Task.WaitAll is a problem. When you are using asynchronous methods await is correct approach.– Fabio
Jan 2 at 5:53
If methods
CalcQuarterlyFigures, CalcWeeklyFigures and CalcMonthlyFigures are asynchronous then Task.WaitAll is a problem. When you are using asynchronous methods await is correct approach.– Fabio
Jan 2 at 5:53
|
show 1 more comment
1 Answer
1
active
oldest
votes
In provided context (sample code of .NET 4.6.1) Task.WaitAll(TaskList.ToArray()) will cause a deadlock.
Definitely useful source: Don't Block on Async Code
You should make you code block fully asynchronous
if (i.DoCalculateAllHistory)
{
var quarterlyTask = CalcQuarterlyFigures(QuarterlyPrices, i.SeriesID);
var weeklyTask = CalcWeeklyFigures(WeeklyPrices, i.SeriesID);
var monthlyTask = CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
// Task.WhenAll accepts "params" array
await Task.WhenAll(quarterlyTask, weeklyTask, monthlyTask);
// You don't need to check for .Count
// nothing will be added when empty list given to .AddRange
quartPerfFig.AddRange(await quarterlyTask);
weeklyPerfFig.AddRange(await weeklyTask);
monthlyPerfFig.AddRange(await monthlyTask);
}
else
{
var monthly = await CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
monthlyPerfFig.AddRange(monthly);
}
Thanks mate, instead ofquarterly.Resultcan we useawait quarterly? similarly for weekly and monthly results ? like this answer usesawaitinstead ofResult
– Pரதீப்
Jan 2 at 6:11
You can useawait.
– Fabio
Jan 2 at 6:26
Thanks for your patience and help. I'll update you if the full run is completed successfully.
– Pரதீப்
Jan 2 at 6:30
1
@Pரதீப்.Resultvs.awaitafter.WhenAllis tricky... If you use.Resultyou show that you understand how all that works but on other hand people who don't will disagree and complain till you putawaitback... Overallawaitis safe if you are concerned that someone will change code by removing.WhenAllas not necessary.
– Alexei Levenkov
Jan 2 at 6:56
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54001297%2fhow-to-check-possibility-of-deadlock-in-c-sharp-code%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
In provided context (sample code of .NET 4.6.1) Task.WaitAll(TaskList.ToArray()) will cause a deadlock.
Definitely useful source: Don't Block on Async Code
You should make you code block fully asynchronous
if (i.DoCalculateAllHistory)
{
var quarterlyTask = CalcQuarterlyFigures(QuarterlyPrices, i.SeriesID);
var weeklyTask = CalcWeeklyFigures(WeeklyPrices, i.SeriesID);
var monthlyTask = CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
// Task.WhenAll accepts "params" array
await Task.WhenAll(quarterlyTask, weeklyTask, monthlyTask);
// You don't need to check for .Count
// nothing will be added when empty list given to .AddRange
quartPerfFig.AddRange(await quarterlyTask);
weeklyPerfFig.AddRange(await weeklyTask);
monthlyPerfFig.AddRange(await monthlyTask);
}
else
{
var monthly = await CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
monthlyPerfFig.AddRange(monthly);
}
Thanks mate, instead ofquarterly.Resultcan we useawait quarterly? similarly for weekly and monthly results ? like this answer usesawaitinstead ofResult
– Pரதீப்
Jan 2 at 6:11
You can useawait.
– Fabio
Jan 2 at 6:26
Thanks for your patience and help. I'll update you if the full run is completed successfully.
– Pரதீப்
Jan 2 at 6:30
1
@Pரதீப்.Resultvs.awaitafter.WhenAllis tricky... If you use.Resultyou show that you understand how all that works but on other hand people who don't will disagree and complain till you putawaitback... Overallawaitis safe if you are concerned that someone will change code by removing.WhenAllas not necessary.
– Alexei Levenkov
Jan 2 at 6:56
add a comment |
In provided context (sample code of .NET 4.6.1) Task.WaitAll(TaskList.ToArray()) will cause a deadlock.
Definitely useful source: Don't Block on Async Code
You should make you code block fully asynchronous
if (i.DoCalculateAllHistory)
{
var quarterlyTask = CalcQuarterlyFigures(QuarterlyPrices, i.SeriesID);
var weeklyTask = CalcWeeklyFigures(WeeklyPrices, i.SeriesID);
var monthlyTask = CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
// Task.WhenAll accepts "params" array
await Task.WhenAll(quarterlyTask, weeklyTask, monthlyTask);
// You don't need to check for .Count
// nothing will be added when empty list given to .AddRange
quartPerfFig.AddRange(await quarterlyTask);
weeklyPerfFig.AddRange(await weeklyTask);
monthlyPerfFig.AddRange(await monthlyTask);
}
else
{
var monthly = await CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
monthlyPerfFig.AddRange(monthly);
}
Thanks mate, instead ofquarterly.Resultcan we useawait quarterly? similarly for weekly and monthly results ? like this answer usesawaitinstead ofResult
– Pரதீப்
Jan 2 at 6:11
You can useawait.
– Fabio
Jan 2 at 6:26
Thanks for your patience and help. I'll update you if the full run is completed successfully.
– Pரதீப்
Jan 2 at 6:30
1
@Pரதீப்.Resultvs.awaitafter.WhenAllis tricky... If you use.Resultyou show that you understand how all that works but on other hand people who don't will disagree and complain till you putawaitback... Overallawaitis safe if you are concerned that someone will change code by removing.WhenAllas not necessary.
– Alexei Levenkov
Jan 2 at 6:56
add a comment |
In provided context (sample code of .NET 4.6.1) Task.WaitAll(TaskList.ToArray()) will cause a deadlock.
Definitely useful source: Don't Block on Async Code
You should make you code block fully asynchronous
if (i.DoCalculateAllHistory)
{
var quarterlyTask = CalcQuarterlyFigures(QuarterlyPrices, i.SeriesID);
var weeklyTask = CalcWeeklyFigures(WeeklyPrices, i.SeriesID);
var monthlyTask = CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
// Task.WhenAll accepts "params" array
await Task.WhenAll(quarterlyTask, weeklyTask, monthlyTask);
// You don't need to check for .Count
// nothing will be added when empty list given to .AddRange
quartPerfFig.AddRange(await quarterlyTask);
weeklyPerfFig.AddRange(await weeklyTask);
monthlyPerfFig.AddRange(await monthlyTask);
}
else
{
var monthly = await CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
monthlyPerfFig.AddRange(monthly);
}
In provided context (sample code of .NET 4.6.1) Task.WaitAll(TaskList.ToArray()) will cause a deadlock.
Definitely useful source: Don't Block on Async Code
You should make you code block fully asynchronous
if (i.DoCalculateAllHistory)
{
var quarterlyTask = CalcQuarterlyFigures(QuarterlyPrices, i.SeriesID);
var weeklyTask = CalcWeeklyFigures(WeeklyPrices, i.SeriesID);
var monthlyTask = CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
// Task.WhenAll accepts "params" array
await Task.WhenAll(quarterlyTask, weeklyTask, monthlyTask);
// You don't need to check for .Count
// nothing will be added when empty list given to .AddRange
quartPerfFig.AddRange(await quarterlyTask);
weeklyPerfFig.AddRange(await weeklyTask);
monthlyPerfFig.AddRange(await monthlyTask);
}
else
{
var monthly = await CalcMonthlyFigures(MonthlyPrice, i.SeriesID);
monthlyPerfFig.AddRange(monthly);
}
edited Jan 2 at 6:26
answered Jan 2 at 6:08
FabioFabio
20k22047
20k22047
Thanks mate, instead ofquarterly.Resultcan we useawait quarterly? similarly for weekly and monthly results ? like this answer usesawaitinstead ofResult
– Pரதீப்
Jan 2 at 6:11
You can useawait.
– Fabio
Jan 2 at 6:26
Thanks for your patience and help. I'll update you if the full run is completed successfully.
– Pரதீப்
Jan 2 at 6:30
1
@Pரதீப்.Resultvs.awaitafter.WhenAllis tricky... If you use.Resultyou show that you understand how all that works but on other hand people who don't will disagree and complain till you putawaitback... Overallawaitis safe if you are concerned that someone will change code by removing.WhenAllas not necessary.
– Alexei Levenkov
Jan 2 at 6:56
add a comment |
Thanks mate, instead ofquarterly.Resultcan we useawait quarterly? similarly for weekly and monthly results ? like this answer usesawaitinstead ofResult
– Pரதீப்
Jan 2 at 6:11
You can useawait.
– Fabio
Jan 2 at 6:26
Thanks for your patience and help. I'll update you if the full run is completed successfully.
– Pரதீப்
Jan 2 at 6:30
1
@Pரதீப்.Resultvs.awaitafter.WhenAllis tricky... If you use.Resultyou show that you understand how all that works but on other hand people who don't will disagree and complain till you putawaitback... Overallawaitis safe if you are concerned that someone will change code by removing.WhenAllas not necessary.
– Alexei Levenkov
Jan 2 at 6:56
Thanks mate, instead of
quarterly.Result can we use await quarterly ? similarly for weekly and monthly results ? like this answer uses await instead of Result– Pரதீப்
Jan 2 at 6:11
Thanks mate, instead of
quarterly.Result can we use await quarterly ? similarly for weekly and monthly results ? like this answer uses await instead of Result– Pரதீப்
Jan 2 at 6:11
You can use
await.– Fabio
Jan 2 at 6:26
You can use
await.– Fabio
Jan 2 at 6:26
Thanks for your patience and help. I'll update you if the full run is completed successfully.
– Pரதீப்
Jan 2 at 6:30
Thanks for your patience and help. I'll update you if the full run is completed successfully.
– Pரதீப்
Jan 2 at 6:30
1
1
@Pரதீப்
.Result vs. await after .WhenAll is tricky... If you use .Result you show that you understand how all that works but on other hand people who don't will disagree and complain till you put await back... Overall await is safe if you are concerned that someone will change code by removing .WhenAll as not necessary.– Alexei Levenkov
Jan 2 at 6:56
@Pரதீப்
.Result vs. await after .WhenAll is tricky... If you use .Result you show that you understand how all that works but on other hand people who don't will disagree and complain till you put await back... Overall await is safe if you are concerned that someone will change code by removing .WhenAll as not necessary.– Alexei Levenkov
Jan 2 at 6:56
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f54001297%2fhow-to-check-possibility-of-deadlock-in-c-sharp-code%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
1
What is the environment? Full .NET Framework or .NET Core?
Task.WaitAll(TaskList.ToArray());will possibly cause a deadlock in full .NET framework. Since you already usingawaitinelsecondition - use.WhenAll:await Task.WhenAll(TaskList.ToArray());– Fabio
Jan 2 at 5:44
@Fabio my application is using
.NET Framework 4.6.1.– Pரதீப்
Jan 2 at 5:46
@Fabio Thanks, let me update the code and check. Application takes almost 1 full day to complete the full run. So it might take 24 hours to confirm if its working.
– Pரதீப்
Jan 2 at 5:47
@Fabio - I have a doubt. Is
awaitin else condition is the problem orTask.WaitAll(TaskList.ToArray())is the problem ?– Pரதீப்
Jan 2 at 5:50
If methods
CalcQuarterlyFigures,CalcWeeklyFiguresandCalcMonthlyFiguresare asynchronous thenTask.WaitAllis a problem. When you are using asynchronous methodsawaitis correct approach.– Fabio
Jan 2 at 5:53