1CPS::Future(3)        User Contributed Perl Documentation       CPS::Future(3)
2
3
4

NAME

6       "CPS::Future" - compatibility wrapper around Future
7

DESCRIPTION

9       This module provides a compatibility wrapper around Future. The code it
10       used to contain was renamed to move it out of the "CPS" distribution.
11       Existing code that refers to "CPS::Future" should be changed to use
12       "Future" instead.
13
14   $future->( @result )
15       This subclass overloads the calling operator, so simply invoking the
16       future object itself as if it were a "CODE" reference is equivalent to
17       calling the "done" method. This makes it simple to pass as a callback
18       function to other code.
19
20       It turns out however, that this behaviour is too subtle and can lead to
21       bugs when futures are accidentally used as plain "CODE" references. See
22       the "done_cb" method instead. This overload behaviour will be removed
23       in a later version.
24
25
26
27perl v5.28.1                      2019-02-02                    CPS::Future(3)
Impressum