docs icon indicating copy to clipboard operation
docs copied to clipboard

Example 1 simply not working.

Open crazygao opened this issue 8 years ago • 2 comments

Now TPL just create a short-running thread or it doesn't really treat it as an async one. Or the continue doesn't work well when the task is already completed. The delegate of Console.WriteLine doesn't work as expected.

crazygao avatar Aug 24 '18 06:08 crazygao

https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/chaining-tasks-by-using-continuation-tasks

crazygao avatar Aug 24 '18 06:08 crazygao

Thanks for reporting this issue, @crazygao. I apologize that it's taken so long to respond to you. The basic problem with the example -- as well as one other in the article -- is that it terminated before the continuation finished execution. We've addressed the issue in dotnet/samples#318 by adding a call to the Task.Wait method.

rpetrusha avatar Sep 22 '18 00:09 rpetrusha