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 the ephemeris as soon as we construct the prognosticator parameters #2168

Merged
merged 4 commits into from
May 12, 2019

Conversation

pleroy
Copy link
Member

@pleroy pleroy commented May 12, 2019

Fix #2165.

// integrate.
// The guard will be destroyed either when the next set of parameters is
// created or when the prognostication has been computed.
// Note that we know that |RefreshPrediction| is called on the main thread and
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we know that both |ephemeris_->ForgetBefore| and |RefreshPrediction| is are called on the main thread

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

}

std::this_thread::sleep_until(wakeup_time);
}
}

Status Vessel::FlowPrognostication(
PrognosticatorParameters const& prognosticator_parameters,
PrognosticatorParameters&& prognosticator_parameters,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#Rf-consume

Flag all X&& parameters (where X is not a template type parameter name) where the function body uses them without std::move.

🚩

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@eggrobin eggrobin added the LGTM label May 12, 2019
@pleroy pleroy merged commit be551e1 into mockingbirdnest:master May 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash when warping at high speed with short history
2 participants