pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:301:    }       //! Reject the @[Future] value.    void failure(mixed value)    {    object key = mux->lock();    unlocked_failure(value);    key = 0;    }    +  //! Reject the @[Future] value unless it has already been fulfilled. +  void maybe_failure(mixed value) +  { +  object key = mux->lock(); +  if (!state) return; +  unlocked_failure(value); +  } +     protected void destroy()    {    if (!state) {    failure(({ "Promise broken.\n", backtrace() }));    }    }   }      protected class FirstCompleted   {