-
Notifications
You must be signed in to change notification settings - Fork 69
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
Synchronize the prognostication when recording and replaying the journal #2141
Conversation
journal/player_test.cpp
Outdated
@@ -57,7 +56,7 @@ class PlayerTest : public ::testing::Test { | |||
TEST_F(PlayerTest, PlayTiny) { | |||
// Do the recording in a separate thread to make sure that it activates using | |||
// a different static variable than the one in the plugin dynamic library. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Update the comment, otherwise we are going to be even more confused next time we look at this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point.
ksp_plugin/interface.hpp
Outdated
@@ -72,6 +72,9 @@ void CDECL principia__ActivateRecorder(bool activate); | |||
extern "C" PRINCIPIA_DLL | |||
void CDECL principia__InitGoogleLogging(); | |||
|
|||
extern "C" PRINCIPIA_DLL | |||
void CDECL principia_VesselMakeSynchronous(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inconsistent naming (_
vs. __
).
This is really not a VesselFoo function (it does not belong in interface_vessel), it exists only to be called by the journal player; perhaps its name should reflect that (from the point of view of the caller, it is the Player counterpart to ActivateRecorder).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
principia__ActivatePlayer
.
Fix #2107.
Also fix a nasty bug where the methods called by the finalizers (on a separate thread) would not be recorded because the recorder was
thread_local
.