Why are async functions async if they're synchronous?

Self-explanatory title. Why is there this confusion? Unless I misinterpreted it… What does it actually mean?

1 Like

A quick google search
image
(also no they are not synchronous)

According to the documentation, though, a function like GetAsync yields, i.e., it waits for a result i.e., it’s the exact opposite of what async is. Further more, it’d really be async if it was a “promisified” function or something like that.

True, but most Async functions can just fail if something doesnt go according to plan, since they access the api (like datastore, filtering etc.)

What is the point you’re trying to make?

Async function mostly access the API. Usually they have to Yield to get a response from the API, yet that time is very VERY small, making it somewhat asynchronous. The problem is just that there may just a wrong response and may error.

Actually that’s a good question that I never thought about and a very good point. There must be some reason they refer to it as asynchronous even though it’s literally the very opposite of asynchronous.

1 Like

It is because the functions are asynchronous internally according to this:

In my opinion, you’d think the functions would be named according to how they behave in lua but it’s probably a naming convention that’s already too widely used to switch back from anyway.

2 Likes

:person_facepalming: They should’ve heard EchoReaper. Since every DataStore ever uses async, it’d be 1. annoying 2. impossible for them to go back on it.

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.