Hello am new to prefect and just reading through t...
# prefect-community
Hello am new to prefect and just reading through the docs. On the Flows page this is super confusing to me:
Return a future
If a flow returns one or more futures, the final state is determined based on the underlying states.
```from prefect import task, flow
def always_fails_task():
raise ValueError("I am bad task")
def always_succeeds_task():
return "foo"
def always_succeeds_flow():
x = always_fails_task()
y = always_succeeds_task()
return y```
What does it mean by futures here? My understanding was that futures are to do with threading and async in Python, of which I see neither here? What am I missing? 🤔
this doc means PrefectFutures which represent the result of a computation happening in a task runner.
Copy code
>>> @flow
>>> def my_flow():
>>>     future = my_task()  # PrefectFuture[str, Sync] includes result type
>>>     future.run_id  # UUID for the task run
Thanks @Anna Geller 🙏 I have submitted a PR to the docs to link
👍 1
🙏 1