I am trying to understand the reason why this is bad to do: (note, here is the asp.net context, regardless of the simple reason why async void cannot be tracked)
public async void Page_Load(object sender, EventArgs e) { ... }
Well, after a little research, I saw several different reasons:
I see here very different (non-overlapping) reasons.
Question:
What is the glory / true reason why we should not write public async void Page_Load(object sender, EventArgs e) ?
nb, I also donβt know why this is a problem, since 4.5 uses UseTaskFriendlySynchronizationContext , which is to support it :
protected async void Page_Load(object sender, EventArgs e){...}
Royi namir
source share