Represent an Operation Awaiting Completion

Edit Package perl-Future
https://metacpan.org/release/Future

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.

Refresh
Refresh
Source Files
Filename Size Changed
Future-0.49.tar.gz 0000101429 99.1 KB
cpanspec.yml 0000000547 547 Bytes
perl-Future.changes 0000014244 13.9 KB
perl-Future.spec 0000003546 3.46 KB
Revision 37 (latest revision is 40)
Dirk Stoecker's avatar Dirk Stoecker (dstoecker) accepted request 1034218 from Tina Müller's avatar Tina Müller (tinita) (revision 37)
- updated to 0.49
   see /usr/share/doc/packages/perl-Future/Changes
  0.49    2022-10-17
          [CHANGES]
           * Big reshuffle to move most code into Future/PP.pm in order to
             support an optional Future-XS distribution too
           * Attempt to load Future::XS by preference if it is available
           * Additional unit tests for cornercases of XS implementation
           * Remember to provide the AWAIT_WAIT API method
           * Migrated Future::Queue out into its own distribution
          [BUGFIXES]
           * Bugfixes and unit tests for convergents on pre-cancelled futures
             (RT144459)
Comments 0
openSUSE Build Service is sponsored by