pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:649:    }       private this_program setup_call_out(int|float seconds, void|int tout)    {    array call_out_handle;    Promise p = promise_factory();    void cancelcout(mixed value)    {    (backend ? backend->remove_call_out : remove_call_out)(call_out_handle);    p->try_success(0); -  } +  };    /* NB: try_* variants as the original promise may get fulfilled    * after the timeout has occurred.    */    on_failure(cancelcout);    call_out_handle = (backend ? backend->call_out : call_out)    (p[tout ? "try_failure" : "try_success"], seconds,    tout && ({ "Timeout.\n", backtrace() }));    if (tout)    on_success(cancelcout);    return p->future();