pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:191:    p->failure(UNDEFINED);    }    return;    };    p->failure(err);    }       //! Return a @[Future] that will be fulfilled with the result    //! of applying @[fun] with the fulfilled result of this @[Future]    //! followed by @[extra]. +  //! +  //! @note +  //! This method is used if your @[fun] returns a regular value (i.e. +  //! @b{not@} a @[Future]). +  //! +  //! @seealso +  //! @[flat_map()], @[transform()]    this_program map(function(mixed, mixed ... : mixed) fun, mixed ... extra)    {    Promise p = Promise();    on_failure(p->failure);    on_success(apply, p, fun, extra);    return p->future();    }       //! Return a @[Future] that will be fulfilled with the fulfilled result    //! of applying @[fun] with the fulfilled result of this @[Future]    //! followed by @[extra]. -  +  //! +  //! @note +  //! This method is used if your @[fun] returns a @[Future] again. +  //! +  //! @seealso +  //! @[map()], @[transform_with()]    this_program flat_map(function(mixed, mixed ... : this_program) fun,    mixed ... extra)    {    Promise p = Promise();    on_failure(p->failure);    on_success(apply_flat, p, fun, extra);    return p->future();    }       //! Return a @[Future] that will be fulfilled with either
pike.git/lib/modules/Concurrent.pmod:257:    return p->future();    }       //! Return a @[Future] that will be fulfilled with either    //! the result of applying @[success] with the fulfilled result    //! followed by @[extra], or the result of applying @[failure]    //! with the failed result followed by @[extra].    //!    //! @[failure] defaults to @[success].    //! +  //! @note +  //! This method is used if your callbacks returns a regular value (i.e. +  //! @b{not@} a @[Future]). +  //!    //! @seealso -  //! @[map] +  //! @[map()], @[transform_with()]    this_program transform(function(mixed, mixed ... : mixed) success,    function(mixed, mixed ... : mixed)|void failure,    mixed ... extra)    {    Promise p = Promise();    on_success(apply, p, success, extra);    on_failure(apply, p, failure || success, extra);    return p->future();    }       //! Return a @[Future] that will be fulfilled with either    //! the fulfilled result of applying @[success] with the fulfilled result    //! followed by @[extra], or the fulfilled result of applying @[failure]    //! with the failed result followed by @[extra].    //!    //! @[failure] defaults to @[success].    //! -  +  //! @note +  //! This method is used if your callbacks returns a @[Future] again. +  //!    //! @seealso -  //! @[flat_map] -  this_program transform_with(function(mixed, mixed ... : Future) success, -  function(mixed, mixed ... : Future)|void failure, +  //! @[flat_map()], @[transform()] +  this_program transform_with(function(mixed, mixed ... : this_program) success, +  function(mixed, mixed ... : this_program)|void failure,    mixed ... extra)    {    Promise p = Promise();    on_success(apply_flat, p, success, extra);    on_failure(apply_flat, p, failure || success, extra);    return p->future();    }       //! @returns    //! A @[Future] that will be fulfilled with an