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

Improve retryUntil's behavior during failure. #282

Merged
merged 1 commit into from Oct 19, 2016

Conversation

non
Copy link
Contributor

@non non commented Oct 19, 2016

Previously retryUntil would throw a StackOverflowException if the
generator failed too many times. It's not obvious to users that the
problem is their generator and/or predicate.

This commit replaces this implicit depth limit with an explicit cutoff
after 10000 tries (along with a custom Exception). It also provides a
two-argument variant of retryUntil that allows the user to specify how
many tries are allowed.

This change should improve the situation in #232.

Previously retryUntil would throw a StackOverflowException if the
generator failed too many times. It's not obvious to users that the
problem is their generator and/or predicate.

This commit replaces this implicit depth limit with an explicit cutoff
after 10000 tries (along with a custom Exception). It also provides a
two-argument variant of retryUntil that allows the user to specify how
many tries are allowed.

This change should improve the situation in typelevel#232.
@rickynils
Copy link
Contributor

Thanks! Much better than risking stack overflows

@rickynils rickynils merged commit fbc8386 into typelevel:master Oct 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants