pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:1052:    return first_completed(futures);   }      //! @returns   //! A @[Future] that represents the array of all the completed @expr{futures@}.   //!   //! @seealso   //! @[all()], @[Promise.depend()]   variant Future results(array(Future) futures)   { +  if(!sizeof(futures)) +  return resolve(({})); +     return Promise()->depend(futures)->future();   }   inline variant Future results(Future ... futures)   {    return results(futures);   }      //! JavaScript Promise API equivalent of @[results()].   //!   //! @seealso