Skip to content

Instantly share code, notes, and snippets.

@i3arnon
Created September 5, 2014 14:54
Show Gist options
  • Save i3arnon/a1de39119f533ea0a943 to your computer and use it in GitHub Desktop.
Save i3arnon/a1de39119f533ea0a943 to your computer and use it in GitHub Desktop.
var root = Task.Delay(-1);
var continuation = root.ContinueWith(t => t.GetAwaiter().GetResult(),new CancellationToken(true));
Console.WriteLine(root.IsCanceled);
Console.WriteLine(continuation.IsCanceled);
@i3arnon
Copy link
Author

i3arnon commented Sep 5, 2014

The output to that would be:

False
True

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment