A few of different strategies for #2:
- Read/write lock -- block writers during iteration.
- Pushing writes onto an update-list if iteration is happening, and having the iterator actually apply the updates.
- A mostly-lockless synchronized table can be iterated safely while it is being updated.
A few of different strategies for #2:
- Read/write lock -- block writers during iteration.
- Pushing writes onto an update-list if iteration is happening, and having the iterator actually apply the updates.
- A mostly-lockless synchronized table can be iterated safely while it is being updated.