Future

An object that stands for a result that is not ready yet, which you can wait on later to get the value or the error.

In more detail

Futures let a program start slow work, carry on, and collect the outcome when it needs it. Waiting on a future blocks until the result or an error is available.

Examples

kafka-python: producer.send returns a future; get(timeout=10) waits for the broker to acknowledge.
meta = producer.send(topic, value=b"x").get(timeout=10)

Related terms

Taught in

References

Certification courses