Skip to content

Instantly share code, notes, and snippets.

@felipeslongo
Created March 6, 2019 20:27
Show Gist options
  • Save felipeslongo/125dd22b52ca7ee0fe7f9d856c9a9637 to your computer and use it in GitHub Desktop.
Save felipeslongo/125dd22b52ca7ee0fe7f9d856c9a9637 to your computer and use it in GitHub Desktop.
Task FireAndForget Extension Method
static async void FireAndForget(this Task task)
{
try
{
await task;
}
catch (Exception e)
{
// log errors
}
}
//https://stackoverflow.com/questions/12803012/fire-and-forget-with-async-vs-old-async-delegate
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment