-
Notifications
You must be signed in to change notification settings - Fork 75
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
thread-safe implementation in realtime_publisher #50
Comments
|
Thank you guys for chasing this. I propose the following:
|
When reading the code, I have a few questions regarding realtime_publisher.h
volatile bool
is used for cross-threads flags. As far as I know, it is undefined behavior in C++. Should we replace that withstd::atomic<bool>
?Some related discussions:
int turn_
is also being used in both threads and not explicitly guarded by any mutex.NO_POLLING
not activated by default? Does it mean the current release version is actually using polling instead ofcondition_variable
, which is in my opinion a much better choice?The text was updated successfully, but these errors were encountered: