Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unconsumed values in reduce can cause infinite loop #10

Open
jefflund opened this issue Nov 7, 2013 · 0 comments
Open

Unconsumed values in reduce can cause infinite loop #10

jefflund opened this issue Nov 7, 2013 · 0 comments
Assignees
Labels

Comments

@jefflund
Copy link
Member

jefflund commented Nov 7, 2013

Consider the following reduce method:

def reduce(self, key, values):
    yield 8

This will just continue spitting out the value 8 for the first key indefinitely. However, the following will spit out a single 8:

def reduce(self, key, values):
    for _ in values:
        pass
    yield 8
@ghost ghost assigned jefflund Nov 7, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant