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

Replace Exceptions for signaling end of iteration #3

Open
acrylic-origami opened this issue Jun 20, 2017 · 0 comments
Open

Replace Exceptions for signaling end of iteration #3

acrylic-origami opened this issue Jun 20, 2017 · 0 comments

Comments

@acrylic-origami
Copy link
Owner

If its child iterators aren't finished, Producer can't know if there are or aren't any more items coming. It then has no choice but to [re]set the ConditionWaitHandle "bell" upon request for values. However, if there are no more items, the bell will throw an UnexpectedValueException rather than failing gracefully; one that is indistinguishable from a ConditionWaitHandle failing elsewhere up the stack and being notified to the bell by a child iterator. Therefore, true race conditions or timing errors in child iterators involving ConditionWaitHandle get smothered when wrapped in a Producer; the Producer simply quits early.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant