pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:471:    f->on_failure(cb_failure, idx);    f->on_success(cb_success, idx);    }    }    }    key = 0;    }       private void fold_one(mixed val) {    mixed err = catch (accumulator = fold_fun(val, accumulator, @extra)); -  if (err) { -  Promise p = promise; // Cache it, to cover a failure race -  if (p) p->failure(err); +  if (err && promise) +  promise->failure(err);    } -  } +        private void fold(function(mixed:void) failsucc) {    failsucc(fold_fun ? accumulator : results);    results = 0; // Free memory    }       private void cb_failure(mixed value, int idx) {    Promise p; // Cache it, to cover a failure race    if (p = promise) {    Thread.MutexKey key = mux->lock();