14759e1065e307c7760299670da30f64ffdbf783,src/python/pants/engine/engine.py,LocalSerialEngine,reduce,#LocalSerialEngine#Any#,149

Before Change


      for step, promise in step_batch:
        keyed_request, result = self._maybe_cache_get(step)
        if result is None:
          result = step(node_builder)
        self._maybe_cache_put(keyed_request, result)
        promise.success(result)


def _try_pickle(obj):
  try:

After Change


  def reduce(self, execution_request):
    generator = self._scheduler.schedule(execution_request)
    for runnable_batch in generator:
      completed = []
      for entry, runnable in runnable_batch:
        key, result = self._maybe_cache_get(entry, runnable)
        if result is None:
          try:
            result = Return(runnable.func(*runnable.args))
            self._maybe_cache_put(key, result)
          except Exception as e:
            result = Throw(e)
        completed.append((entry, result))
      generator.send(completed)


def _try_pickle(obj):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: pantsbuild/pants
Commit Name: 14759e1065e307c7760299670da30f64ffdbf783
Time: 2016-08-27
Author: stuhood@gmail.com
File Name: src/python/pants/engine/engine.py
Class Name: LocalSerialEngine
Method Name: reduce


Project Name: pantsbuild/pants
Commit Name: 14759e1065e307c7760299670da30f64ffdbf783
Time: 2016-08-27
Author: stuhood@gmail.com
File Name: src/python/pants/engine/engine.py
Class Name: LocalMultiprocessEngine
Method Name: _submit_until


Project Name: pantsbuild/pants
Commit Name: 14759e1065e307c7760299670da30f64ffdbf783
Time: 2016-08-27
Author: stuhood@gmail.com
File Name: src/python/pants/engine/engine.py
Class Name: ThreadHybridEngine
Method Name: _submit_until