-
Notifications
You must be signed in to change notification settings - Fork 2.1k
TemplateRenderer should use ThrowIfFaulted when waiting for faulted task #782
Comments
@davidfowl @lodejard - We are thinking that editor templates should just be sync only. |
I was under the impression that wait calls can end up being deadlocks, and its generally frowned upon. Can we instead say that editor templates are sync only? |
Spoke to @GrabYourPitchforks about this today and his opinion was that in the absence of a sync context, we shouldn't have the same sort of issues calling |
Should we have an extension method to do that? -----Original Message----- Spoke to @GrabYourPitchforks about this today and his opinion was that in the absence of a sync context, we shouldn't have the same sort of issues calling Wait(). His only suggestion was to change the actual Wait() call to task.GetAwaiter().GetResult(). This preserves the stack trace in the event the Task throws. |
We decided to reduce the scope of this bug and address the issue with calling |
Was this done? If so why is it still working? /cc @yishaigalatzer @danroth27 |
Html.EditorFor
andHtml.DisplayFor
are synchronous today. When rendering a view for the editor \ display template, it callsWait()
. Instead we should have both a sync and async pipeline (addHtml.EditorForAsync
,Html.DisplayForAsync
) and have the synchronous version make the blocking call.Original discussion:
The text was updated successfully, but these errors were encountered: