> ## Documentation Index
> Fetch the complete documentation index at: https://gluals.arnux.net/llms.txt
> Use this file to discover all available pages before exploring further.

# @async

> Mark a function that must be called from asynchronous code.

`@async` marks a function that must be called from another async function. It is metadata for GLuaLS; it does not change runtime behavior.

## Use it on an async function

```lua theme={null}
---@async
function WaitForNextTick()
    coroutine.yield()
end
```

## What it does

* Marks the function as async in hover documentation.
* Reports an `await-in-sync` diagnostic when an async function is called from a non-async function.
* Has no runtime effect.

Mark your coroutine or callback wrapper as `@async`; GLuaLS cannot make an ordinary callback API asynchronous.
