pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:18:   //! callback fails. This is useful to log exceptions, so they are not   //! just silently caught and ignored.   void on_failure(function(mixed : void) f)   {    global_on_failure = f;   }   protected function(mixed : void) global_on_failure;      //! @param enable   //! Setting this to @expr{false@} causes all @[Concurrent] callbacks - //! to be called directly, without using a backend (except for timeouts). + //! (except for timeouts) + //! to be called directly, without using a backend. + //! + //! @note + //! (Un)setting this typically alters the order in which some callbacks + //! are called (depending on what happens in a callback).   final void use_backend(int enable)   {    callout = enable ? call_out : callnow;   }      private mixed    callnow(function(mixed ...:void) f, int|float delay, mixed ... args)   {    f(@args);    return 0;
pike.git/lib/modules/Concurrent.pmod:839:    _astate->results->on_failure(try_failure);    _astate->results->on_success(try_success);    _astate = 0;    } else    success(0);    return this_program::this;    }       //! @param max    //! Specifies the maximum number of failures to be accepted in -  //! the list of futures this promise depends upon. Defaults -  //! to @expr{0@}. @expr{-1@} means unlimited. +  //! the list of futures this promise depends upon.    //! -  +  //! @expr{-1@} means unlimited. +  //! +  //! Defaults to @expr{0@}. +  //!    //! @returns    //! The new @[Promise].    //!    //! @seealso    //! @[depend()], @[min_failures()], @[any_results()]    this_program max_failures(int(-1..) max)    {    fill_astate();    _astate->max_failures = max;    return this_program::this;