You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If understood correctly, async keyword is just a syntax sugar and shouldn't change public API.
Right now it does. Here's a repro:
publicinterfaceITopology{Task<bool>RunChecks();}publicclassA:ITopology{publicTask<bool>RunChecks(){returnTask.FromResult(true);}}publicclassB:ITopology{publicasyncTask<bool>RunChecks(){awaitTask.Delay(1);// mimicing some other callawaitTask.Delay(2);// mimicing some other call// logic to generate returned result based on invocationsreturntrue;}}
@SeanFeldman The async keyword should not be part of the public API at all. I submitted a PR #26
The async keyword is an implementation detail since it is just syntactic sugar. From an API perspective the following APIs are equivalent:
async void vs. void
async Task vs Task
async Task<T> vs Task<T>
From a behavior perspective you could argue that the runtime behavior from void to async void can change and therefore it could be a breaking change but from an API perspective both APIs are binary compatible. Since API approver's concern is only the public API the async keyword should be omitted. Thoughts?
If understood correctly,
async
keyword is just a syntax sugar and shouldn't change public API.Right now it does. Here's a repro:
Generate code is:
The text was updated successfully, but these errors were encountered: