-
Notifications
You must be signed in to change notification settings - Fork 82
Fix realtime publisher race condition upon initialization #309
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
Fix realtime publisher race condition upon initialization #309
Conversation
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.
Note my comments and see if you agree
@saikishor Yes, I will test it today or tomorrow. Thanks for fixing 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.
This looks great.
So we don't need something like
while (!publisher_->is_running()) {
std::this_thread::sleep_for(std::chrono::milliseconds(10));
}
in the application code, right?
Yess! Exactly |
@saikishor I ran a test 20 times pre-PR and had a 85% failure rate. I ran another test 20 times post-PR and had 100% success. So I think the PR fixes the problem. I am approving the PR. |
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.
LGTM
(cherry picked from commit 0d605d2)
(cherry picked from commit 0d605d2)
) (#311) Co-authored-by: Sai Kishor Kothakota <[email protected]>
) (#310) Co-authored-by: Sai Kishor Kothakota <[email protected]>
Should fix : #24
Closes: #308
@bijoua29 can you test this and see if this helps?