Example 1 simply not working.
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.
https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/chaining-tasks-by-using-continuation-tasks
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.