Package Info

perl-Future


Represent an operation awaiting completion


Unspecified

A 'Future' object represents an operation that is currently in progress, or has recently completed. It can be used in a variety of ways to manage the flow of control, and data, through an asynchronous program.

Some futures represent a single operation and are explicitly marked as ready by calling the 'done' or 'fail' methods. These are called "leaf" futures here, and are returned by the 'new' constructor.

Other futures represent a collection of sub-tasks, and are implicitly marked as ready depending on the readiness of their component futures as required. These are called "convergent" futures here as they converge control and data-flow back into one place. These are the ones returned by the various 'wait_' and 'need_' constructors.

It is intended that library functions that perform asynchronous operations would use future objects to represent outstanding operations, and allow their calling programs to control or wait for these operations to complete. The implementation and the user of such an interface would typically make use of different methods on the class. The methods below are documented in two sections; those of interest to each side of the interface.

It should be noted however, that this module does not in any way provide an actual mechanism for performing this asynchronous activity; it merely provides a way to create objects that can be used for control and data flow around those operations. It allows such code to be written in a neater, forward-reading manner, and simplifies many common patterns that are often involved in such situations.

See also Future::Utils which contains useful loop-constructing functions, to run a future-returning function repeatedly in a loop.

Unless otherwise noted, the following methods require at least version 0.08.


License: Artistic-1.0 OR GPL-1.0-or-later
URL: https://metacpan.org/release/Future

Categories

Releases

Package Version Update ID Released Package Hub Version Platforms Subpackages
0.49-bp155.1.4 info GA Release 2023-05-17 15 SP5
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Future
0.47-bp154.1.15 info GA Release 2022-05-09 15 SP4
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Future
0.38-bp153.1.12 info GA Release 2021-03-06 15 SP3
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Future
0.38-bp152.3.15 info GA Release 2020-04-16 15 SP2
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Future
0.38-bp151.3.1 info GA Release 2019-07-16 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Future
0.38-bp151.2.12 info GA Release 2019-05-18 15 SP1
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Future
0.38-bp150.2.4 info GA Release 2018-07-30 15
  • AArch64
  • ppc64le
  • s390x
  • x86-64
  • perl-Future