pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:351:    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();    }    +  //! @param others +  //! The other futures (results) you want to append. +  //!    //! @returns -  //! A @[Future] that will be fulfilled with an +  //! A new @[Future] that will be fulfilled with an    //! array of the fulfilled result of this object followed -  //! by the fulfilled results of @[others]. +  //! by the fulfilled results of other futures.    //!    //! @seealso    //! @[results()] -  this_program zip(this_program ... others) +  this_program zip(array(this_program) others)    {    if (sizeof(others))    return results(({ this_program::this }) + others);    return this_program::this;    } -  +  inline variant this_program zip(this_program ... others) +  { +  return zip(others); +  }       //! JavaScript Promise API close but not identical equivalent    //! of a combined @[transform()] and @[transform_with()].    //!    //! @param onfulfilled    //! Function to be called on fulfillment. The first argument will be the    //! result of @b{this@} @[Future].    //! The return value will be the result of the new @[Future].    //! If the return value already is a @[Future], pass it as-is.    //!