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

SolarSystemPopulationManager.spinoff(..) seems not thread-safe #328

Open
ultimate opened this issue Aug 25, 2015 · 2 comments
Open

SolarSystemPopulationManager.spinoff(..) seems not thread-safe #328

ultimate opened this issue Aug 25, 2015 · 2 comments
Assignees
Milestone

Comments

@ultimate
Copy link
Owner

If the origin population is update by the worker while a spinoff is being processed this can result in a small amount of population to be left in the system in Exodus since the amount send away is only calculate once at the beginning of the function.

@ultimate
Copy link
Owner Author

Options:

  • make the method "atomic"
  • sync the method with the worker
  • rewrite the logic only to push the spinoffs to a queue and handle them in worker between calculations

@ultimate
Copy link
Owner Author

For the moment I think an "atomic" version would be sufficient but for the future an integration into the worker seems the best way.

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