Skip to content

Instantly share code, notes, and snippets.

@danielmarbach
Created December 5, 2017 13:02
using System;
using System.Threading;
using System.Threading.Tasks;
namespace test
{
class Program
{
static async Task Main(string[] args)
{
await Task.Factory.StartNew(async () => await DoStuff().ConfigureAwait(false), CancellationToken.None, TaskCreationOptions.None, TaskScheduler.Current);
}
static async Task DoStuff(bool doSleep = true, bool configAwait = true)
{
}
}
}
@danielmarbach
Copy link
Author

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment