Let's say I named a function DoSomethingAsync.
Now, without running it. Do you think it yields, or runs immediately, but returns something later, and allows the caller to continue running more stuff without waiting for DoSomethingAsync?
Not specifically tied to any language, could be anything.
I am asking this because I want to know the following:
Important to those that create APIs in any sort of Engine, or Mozilla themselves. When should they actually name "Async" in a function?
Does "Async" in a function really say whether it yields or non-blocking?
When is it really wise to name a function "Async" ?
async function foo() { }is my only reason, because then you can useawaitin JavaScript for instance.
Let's say I have these functions:
OneAsync - non-blocking
TwoAsync - yields
ThreeAsync - non-blocking
Would it be a wise choice, to name all functions "Async" at the end? Seen there, 2 of them are non-blocking but do something in the background, maybe even return something, or let you pass a transformation function. While one of them yields.
Wouldn't it be better to suffix one with "Yield" or similar?