Created
January 19, 2021 13:53
-
-
Save chrisnas/2d0b0900d0cc2edc1ad6478294236687 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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