# async_loop_config Struct Reference

# async_loop_config

## Summary

| ### Public attributes ||
|---|---|
| `https://fuchsia.dev/reference/cpp/struct/async-loop-config#structasync__loop__config_1a52a28182626ecea6fd5f20e970d56f95` | `void *` Data to pass to the callback functions. |
| `https://fuchsia.dev/reference/cpp/struct/async-loop-config#structasync__loop__config_1a1f81e4abc52962c8cca21b90cc76adef` | `https://fuchsia.dev/reference/cpp/struct/async-loop-default-accessors-t#structasync__loop__default__accessors__t` If specified, these functions will be used to register the loop as the default dispatcher on the thread on which they are called and will be used to automatically unregister the loop when it is destroyed. |
| `https://fuchsia.dev/reference/cpp/struct/async-loop-config#structasync__loop__config_1a3f705e1f43d6fc417492c316b2b8c316` | `async_loop_callback_t *` A function to call after the dispatcher invokes each handler, or NULL if none. |
| `https://fuchsia.dev/reference/cpp/struct/async-loop-config#structasync__loop__config_1a9e1b719deeba3731650b28e56c16d4cd` | `bool` True if IRQs should be supported. |
| `https://fuchsia.dev/reference/cpp/struct/async-loop-config#structasync__loop__config_1aeb1f69d1ea938a5795ade844b7d7e246` | `bool` If true, then uses default_accessors.setter to register the loop as the default dispatcher for the thread upon which the loop was created. |
| `https://fuchsia.dev/reference/cpp/struct/async-loop-config#structasync__loop__config_1a31e027b03f678acf743223f53b4838e5` | `async_loop_callback_t *` A function to call before the dispatcher invokes each handler, or NULL if none. |

## Public attributes

### data

```c++
void * async_loop_config::data
```
Data to pass to the callback functions.

### default_accessors

```c++
async_loop_default_accessors_t async_loop_config::default_accessors
```
If specified, these functions will be used to register the loop as the default dispatcher on the thread on which they are called and will be used to automatically unregister the loop when it is destroyed.

If NULL, the loop will not do this. The loop's creator is then responsible for retrieving the loop's dispatcher using \|async_loop_get_dispatcher()\| and passing it around explicitly.

It is an error for only one of the functions to be non-NULL.

Note that the loop can be used even without setting it as the current thread's default.

### epilogue

```c++
async_loop_callback_t * async_loop_config::epilogue
```
A function to call after the dispatcher invokes each handler, or NULL if none.

### irq_support

```c++
bool async_loop_config::irq_support
```
True if IRQs should be supported.

### make_default_for_current_thread

```c++
bool async_loop_config::make_default_for_current_thread
```
If true, then uses default_accessors.setter to register the loop as the default dispatcher for the thread upon which the loop was created.

TRANSITIONAL BEHAVIOR: If default_accesors are not specified and this flag is true, then behaves as if async_get_default_dispatcher/async_set_default_dispatcher were specified as the default_accessors.

### prologue

```c++
async_loop_callback_t * async_loop_config::prologue
```
A function to call before the dispatcher invokes each handler, or NULL if none.