Created
April 1, 2016 10:22
-
-
Save CrazyMORF/614098fcbade81314867f0952be68e4f to your computer and use it in GitHub Desktop.
Index action lock at line 18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Threading; | |
using System.Threading.Tasks; | |
using System.Web.Mvc; | |
namespace WebApplication5.Controllers | |
{ | |
public class HomeController : Controller | |
{ | |
static async Task Work() | |
{ | |
await Task.Delay(1000);//.ConfigureAwait(false); | |
} | |
public ActionResult Index() | |
{ | |
var currentThread = Thread.CurrentThread; //IsBackground=false IsThreadPoolThread=false | |
var work = Work(); | |
work.Wait(); //Deadlock | |
return View(); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment