pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:32:   //! (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)   { -  // This cast allows tail call optimisation -  return [function(mixed ...:mixed)]f(@args); +  mixed err = catch (f(@args)); +  if (err) +  master()->handle_error(err); +  return 0;   }      protected function(function(mixed ...:void), int|float, mixed ...:mixed)    callout = call_out;      //! Value that will be provided asynchronously   //! sometime in the future.   //!   //! @seealso   //! @[Promise]