> For the complete documentation index, see [llms.txt](https://dibs.gitbook.io/vortex-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dibs.gitbook.io/vortex-docs/standard-modules/future.md).

# Future

The 'future' module provides a type that wraps around the Vortex built-in \_\_future\_\_ functionality

### Function Signatures

{% code overflow="wrap" %}

```go
/*
    Wraps the __future__ functionality in an easy to use object.
    func: the function to run in another thread
    default: the default value to return if the real value isn't ready
*/

type Future = (func: Function, default: Any = None) => {
    // The value of the async function
    value: Any,
    // If the value is ready
    ready: Boolean,
    // If the async function has finished
    finished: Boolean,
    // Checks if the value is ready
    is_ready: () => Boolean,
    // Returns value if ready, else returns the default [Non-blocking]
    get: () => Any,
    // Waits for the value to be ready, then returns it [Blocking]
    wait_for: () => Any
}
```

{% endcode %}
