Skip to content

Commit

Permalink
Fix a flaw in the logic of the parallel execution engine
Browse files Browse the repository at this point in the history
  • Loading branch information
versae committed Apr 24, 2016
1 parent 5628674 commit bc12d95
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions functional/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ def evaluate(self, sequence, transformations):
raise_errors=self.raise_errors)
staged = []
for transform in transformations:
strategies = transform.execution_strategies
if strategies and ExecutionStrategies.PRE_COMPUTE in strategies:
result = list(result)
if strategies and ExecutionStrategies.PARALLEL in strategies:
strategies = transform.execution_strategies or {}
if ExecutionStrategies.PARALLEL in strategies:
staged.insert(0, transform.function)
else:
if staged:
result = parallel(compose(*staged), result)
staged = []
if ExecutionStrategies.PRE_COMPUTE in strategies:
result = list(result)
result = transform.function(result)
if staged:
result = parallel(compose(*staged), result)
Expand Down

0 comments on commit bc12d95

Please sign in to comment.