Async in Roblox Function Names

I haven’t actually seen a post about this before, and have been wondering this question for a while. I’ve noticed that a lot of functions that Roblox services use, as well as functions on things like players, they have names like “UserOwnsGamePassAsync”, or “ComputeAsync”.

Is there any difference between Roblox functions that have the word async at the end of the name and ones that don’t?

(If there is a post about this same topic that I missed please tell me)

10 Likes

Yes, they do and you can find out through further research on the dev reference API will give you hints on what async means such as for “UserOwnsGamePass Async, “Compute Async, or even for data store with GetAsync.

If you notice the first thing they all have is a big yellow text that says this:

Yields
This is a yielding function. When called, it will pause the Lua thread that called the function until a result is ready to be returned, without interrupting other scripts.

Hmm, so Async does yielding? IDK so I’ll further research on google, pretty good question you have there I’m learning a lot. The second search term comes up with this thread on promises?

And by reading the thread you can get an idea of what Async means via this quote:

From this, we can infer Async is short hand for “asynchronous" which the Roblox functions does as they involve “asynchronous operation” like UserOwnsGamePass Async ”, or “Compute Async ” because they involve data which is not available because the information is still being requested like if the user has a gamepass or a player’s datastore stats.

Plus there is also a wiki article to read more about it here:

Overall, pretty good question hope the links help you learn something new for programming.

12 Likes