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

Guard against modification during iteration #41

Closed
rtheunissen opened this issue Aug 30, 2016 · 1 comment
Closed

Guard against modification during iteration #41

rtheunissen opened this issue Aug 30, 2016 · 1 comment

Comments

@rtheunissen
Copy link
Member

The best way I can think of doing this is to keep track of the number of active iterators on the structure, and check if this is > 0 when modifying the structure (during push, remove etc). This will incur a small amount of overhead.

The other question is what to do when that number is > 0?

  • throw an exception
  • create a warning
@rtheunissen
Copy link
Member Author

See #17

@rtheunissen rtheunissen removed this from the 2.0.0 milestone Jul 19, 2017
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