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