Skip to content

Instantly share code, notes, and snippets.

@pedroreys
Created April 2, 2013 15:03
Show Gist options
  • Save pedroreys/5292915 to your computer and use it in GitHub Desktop.
Save pedroreys/5292915 to your computer and use it in GitHub Desktop.
find the potential bug
public static class Foo
{
private static async Task DelayAsync()
{
await Task.Delay(1000);
}
public static void Test()
{
var delayTask = DelayAsync();
delayTask.Wait();
}
}
@pedroreys
Copy link
Author

Nailed it, @juanplopes!

By the way, got the example from here: http://msdn.microsoft.com/en-us/magazine/jj991977.aspx

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