pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:151:    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 fulfiled result of this @[Future], or the result +  //! the fulfilled result of this @[Future], or the result    //! of applying @[fun] with the failed result followed    //! by @[extra].    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 fulfiled result of this @[Future], or the fulfilled result +  //! the fulfilled result of this @[Future], or the fulfilled result    //! of applying @[fun] with the failed result followed    //! by @[extra].    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();    }