Task-based async best practice

This forum is meant for anything you would like to share with other visitors
NickFriend
Posts: 248
Joined: Fri Oct 14, 2016 7:09 am

Task-based async best practice

Post 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
ic2
Posts: 1804
Joined: Sun Feb 28, 2016 11:30 pm
Location: Holland

Task-based async best practice

Post 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
Post Reply