What is Future references?

A Future reference (or Futures or Future Promise in some languages) is a representation of a single value which is, at some point, eventually produced asynchronously via a computation which is yet to be started or completed.

A producer of a future object can notify it at a later time when the value is ready. Similarly, before the value that a Future references is available or computed, a consumer can block, poll or take some other action to be notified when the value is set or wait until the value is available.

Learnify Hub © www.0685.com All Rights Reserved