Skip to content

Instantly share code, notes, and snippets.

@chrisnas
Created January 19, 2021 13:53
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 chrisnas/2d0b0900d0cc2edc1ad6478294236687 to your computer and use it in GitHub Desktop.
Save chrisnas/2d0b0900d0cc2edc1ad6478294236687 to your computer and use it in GitHub Desktop.
static async Task Main(string[] args)
{
Console.WriteLine($"pid = {Process.GetCurrentProcess().Id}");
Console.WriteLine("press ENTER to start...");
Console.ReadLine();
await ComputeAsync();
Console.WriteLine("press ENTER to exit...");
Console.ReadLine();
}
private static async Task ComputeAsync()
{
await Task.WhenAll(
Compute1(),
...
Compute1()
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment