pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:197:       //! 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()] +  //! @[flat_map()], @[transform()], @[recover()]    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()] +  //! @[map()], @[transform_with()], @[recover_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    //! the fulfilled result of this @[Future], or the result    //! of applying @[fun] with the failed result followed    //! by @[extra]. -  +  //! +  //! @note +  //! This method is used if your callbacks returns a regular value (i.e. +  //! @b{not@} a @[Future]). +  //! +  //! @seealso +  //! @[recover_with()], @[map()], @[transform()]    this_program recover(function(mixed, mixed ... : mixed) fun,    mixed ... extra)    {    Promise p = Promise();    on_success(p->success);    on_failure(apply, p, fun, extra);    return p->future();    }       //! Return a @[Future] that will be fulfilled with either    //! the fulfilled result of this @[Future], or the fulfilled result    //! of applying @[fun] with the failed result followed    //! by @[extra]. -  +  //! +  //! @note +  //! This method is used if your callbacks returns a @[Future] again. +  //! +  //! @seealso +  //! @[recover()], @[flat_map()], @[transform_with()]    this_program recover_with(function(mixed, mixed ... : this_program) fun,    mixed ... extra)    {    Promise p = Promise();    on_success(p->success);    on_failure(apply_flat, p, fun, extra);    return p->future();    }       //! Return a @[Future] that either will by fulfilled by the
pike.git/lib/modules/Concurrent.pmod:275:    //! 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()], @[transform_with()] +  //! @[transform_with()], @[map()], @[recover()]    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();    }   
pike.git/lib/modules/Concurrent.pmod:297:    //! 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()], @[transform()] +  //! @[transform()], @[flat_map()], @[recover_with]    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();    }