xsharp.eu • Task-based async best practice - Page 2
Page 2 of 2

Task-based async best practice

Posted: Mon Jul 02, 2018 4:17 pm
by NickFriend
Hi Dick,

The code in the Infoworld article is actually a bit different... in that case Task.Run() is being awaited, which is why the method is also marked as "async". The code I'm proposing does not await the Task.Run call, which is the whole point as the idea is to short-circuit the need to keep propagating the async calls up through the method hierarchy.

It is definitely confusing though! I still haven't reached a definitive answer.

Nick

Task-based async best practice

Posted: Mon Jul 02, 2018 5:47 pm
by ic2
Hello Nick,

I have planned to make methods of one of our X# programs async as well. No doubt it requires a couple of searches. I'll keep your issue in mind and should I come around something which may help you I'll add it here.

Dick