C#C
C#4y ago
Jona4Play

✅ Awaiting a method exits program

I don't why but awaiting this method will result in the code exiting with only ever reaching Checkpoint A. While this has let me to believe that there was some error in the method I'm calling I added a debug message. This debug message is also never displayed before the program exits. Same applies when creating a list of tasks and awaiting them with Task.WhenAll().
Is there anything super simple I'm missing?
foreach (var link in outstanding)
                {
                    Console.WriteLine("Checkpoint A");
                    docs.Add(await Scraper.ScrapFromLinkAsync(link));
                    Console.WriteLine("Checkpoint B");
                }
Was this page helpful?