Skip to content

Instantly share code, notes, and snippets.

@programmation
Last active October 20, 2015 04:45
Show Gist options
  • Save programmation/6cc84cfce8e296596364 to your computer and use it in GitHub Desktop.
Save programmation/6cc84cfce8e296596364 to your computer and use it in GitHub Desktop.
Async mixin utilities
using System;
using System.Threading.Tasks;
namespace MyApp
{
// Borrowed from @rid00z (http://www.michaelridland.com)
public static class AsyncMixin
{
public static void RunForget(this Task t)
{
t.ContinueWith((tResult) =>
{
//Console.WriteLine(t.Exception)
//TODO: Log to Xamarin insights
},
TaskContinuationOptions.OnlyOnFaulted);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment