pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:18:   //! Global failure callback, called when a promise without failure   //! 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 - //! (except for timeouts) - //! to be called directly, without using a backend. + //! @int + //! @value 0 + //! A @expr{false@} value causes all @[Concurrent] callbacks + //! (except for timeouts) to default to being called directly, + //! without using a backend. + //! @value 1 + //! A @expr{true@} value causes callbacks to default to being + //! called via @[Pike.DefaultBackend]. + //! @endint   //!   //! @note -  + //! Be very careful about running in the backend disabled mode, + //! as it may cause unlimited recursion and reentrancy issues. + //! + //! @note   //! As long as the backend hasn't started, it will default to @expr{false@}.   //! Upon startup of the backend, it will change to @expr{true@} unless you   //! explicitly called @[use_backend()] before that.   //!   //! @note   //! (Un)setting this typically alters the order in which some callbacks   //! are called (depending on what happens in a callback).   //!   //! @seealso   //! @[Future()->set_backend()], @[Future()->call_callback()]