# Asynchronous Annotations

We have also extended the interceptor registration process so you can annotate interception points to denote threading. You will do so with the following two annotations:

| Argument        | Type                       | Required | Default Value | Description                                                                                                                      |
| --------------- | -------------------------- | -------- | ------------- | -------------------------------------------------------------------------------------------------------------------------------- |
| `async`         | none                       | false    | false         | If the annotation exists, then ColdBox will execute the interception point in a separate thread only if not in a thread already. |
| `asyncPriority` | string : *low,normal,high* | false    | *normal*      | The thread priority that will be sent to each cfthread call that is made by the system.                                          |

This allows you the flexibility to determine in code which points are threaded, which is a great way to use for emails, logging, etc.

```javascript
function preProcess( event, data ) async asyncPriority="low"{
    // Log current request information
    log.info("Executing request: #event.getCurrentEvent()#", getHTTPRequestData() );    
}
```

So if you have 3 interceptors in a chain and only 1 of them is threaded, then the 2 will execute in order while the third one in the background. Overall, your processing power and choices have now grown.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://coldbox.ortusbooks.com/the-basics/interceptors/interceptor-asynchronicity/asynchronous-annotations.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
