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

Remove Ephemeris::ForgetBefore #2090

Closed
pleroy opened this issue Mar 10, 2019 · 1 comment · Fixed by #2151
Closed

Remove Ephemeris::ForgetBefore #2090

pleroy opened this issue Mar 10, 2019 · 1 comment · Fixed by #2151
Assignees

Comments

@pleroy
Copy link
Member

pleroy commented Mar 10, 2019

This function breaks a number of invariants, and it is dangerous to call in parallel with iteration over the Ephemeris. It may be a remnant of a time when we were concerned about memory usage. One option would be to not serialize the deep past, so when reloading a save memory would be reclaimed, but without ill-effects on the actual computations.

@pleroy
Copy link
Member Author

pleroy commented Mar 25, 2019

Better idea: have a lock system that ensures that the interval [t, +∞[ is not affected by ForgetBefore when computing a prediction that starts at t. Acquire at the beginning of the prognostication loop, release at the end (probably using an RAII object). ForgetBefore can only discard the unlocked part of the timeline. Locking can fail if t has already been forgotten.

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 a pull request may close this issue.

1 participant