Today, I wasted 2 hours debugging what I thought was very odd behaviour in #csharp until I learned that async Task
and async void
are two very different things, and now I am very angry about async void
. Was about to ban its usage entirely, but this SO article was helpful in explaining how it can be useful and not just a foot-gun
https://stackoverflow.com/questions/12144077/async-await-when-to-return-a-task-vs-void
=> More informations about this toot | More toots from eldamir@hachyderm.io
@eldamir The best explanations I know of are here: https://github.com/davidfowl/AspNetCoreDiagnosticScenarios/blob/master/AsyncGuidance.md
=> More informations about this toot | More toots from driggy@mastodon.gamedev.place
@driggy @eldamir
@davidfowl is on Mastodon
=> More informations about this toot | More toots from SmartmanApps@dotnet.social This content has been proxied by September (ba2dc).Proxy Information
text/gemini