Skip to content

Instantly share code, notes, and snippets.

@mantzas
Created May 26, 2016 19:38
Show Gist options
  • Save mantzas/5ffbdce1fbf17ba214055299aff7ab1a to your computer and use it in GitHub Desktop.
Save mantzas/5ffbdce1fbf17ba214055299aff7ab1a to your computer and use it in GitHub Desktop.
public void Test()
{
// Cold Task
var t = new Task(() => Console.WriteLine());
// Hot Task
t.Start(); //now it's hot
var tHot1 = Task.Run(()=>Console.WriteLine());
var tHot2 = GetJsonAsync(new Uri("http://......"));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment