TPL Task deadlock when calling async from sync without await in MVC
问题 I understand there's a TPL deadlock trap when calling async method within a sync MVC method, while using .Wait() or .Result to wait till the task complete. But we just found a strange behaviour in our MVC application: The sync action calls an async method, but since it's a trigger, we never waited it complete. Still, the async method seems stucked. Code is like below, this strange issue not 100% happens. It just happens sometime. When it happens: The HomeController.Index() action completed