pike.git / lib / modules / Concurrent.pmod

version» Context lines:

pike.git/lib/modules/Concurrent.pmod:480:    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);    }    }       private void fold(function(mixed:void) failsucc) {    failsucc(fold_fun ? accumulator : results); -  results = 0; +  results = 0; // Free memory    }       private void cb_failure(mixed value, int idx) {    Promise p; // Cache it, to cover a failure race    if (p = promise) {    object key = mux->lock();    do {    if (!p->state) {    ++failed;    if (max_failed < failed && max_failed >= 0) {
pike.git/lib/modules/Concurrent.pmod:509:    else    fold_one(value);    if (success) {    fold(failed >= min_failed ? p->success : p->failure);    break;    }    } else    key = 0;    return;    } while (0); -  promise = 0; // Free backreference +  promise = 0; // Free backreference    }    }       private void cb_success(mixed value, int idx) {    Promise p; // Cache it, to cover a failure race    if (p = promise) {    object key = mux->lock();    do {    if (!p->state) {    ++succeeded;
pike.git/lib/modules/Concurrent.pmod:539:    else    fold_one(value);    if (success) {    fold(p->success);    break;    }    } else    key = 0;    return;    } while (0); -  promise = 0; // Free backreference +  promise = 0; // Free backreference    }    }   }      //! Promise to provide a @[Future] value.   //!   //! Objects of this class are typically kept internal to the   //! code that provides the @[Future] value. The only thing   //! that is directly returned to the user is the return   //! value from @[future()].