Brunet.Services.MapReduce.MapReduceComputation.Reduce C# (CSharp) Метод

Reduce() защищенный Метод

protected Reduce ( RpcResult child_r ) : void
child_r Brunet.Messaging.RpcResult
Результат void
    protected void Reduce(RpcResult child_r) {
      //The usual transactional bit:
      State state = _state;
      State old_state;
      State new_state;
      do {
        old_state = state;
        new_state = old_state.AddChildResult(child_r);
        state = Interlocked.CompareExchange<State>(ref _state, new_state, old_state);
      }
      while( state != old_state);
      //If we need to start a new reduce, it's the latest value:  
      TryNextReduce(new_state, old_state, child_r, false);
    }