CPS::Future(3pm)

CPS::Future3pm

Compatibility wrapper around future

Overview

This module provides a compatibility wrapper around Future. The code it used to contain was renamed to move it out of the "CPS" distribution. Existing code that refers to "CPS::Future" should be changed to use "Future" instead.

$future->( @result )

This subclass overloads the calling operator, so simply invoking the future object itself as if it were a "CODE" reference is equivalent to calling the "done" method. This makes it simple to pass as a callback function to other code.

It turns out however, that this behaviour is too subtle and can lead to bugs when futures are accidentally used as plain "CODE" references. See the "done_cb" method instead. This overload behaviour will be removed in a later version.

Releases

4 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7
  2. 8
  3. 9–10

From libcps-perl 0.18-1 in Debian 10 (Buster). Parsed by carta from the page's man source.