Skip to content

Instantly share code, notes, and snippets.

@danielmarbach
Created December 5, 2017 13:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danielmarbach/e096707c2267adeb6c2de2b47c676d79 to your computer and use it in GitHub Desktop.
Save danielmarbach/e096707c2267adeb6c2de2b47c676d79 to your computer and use it in GitHub Desktop.
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