You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current implementation suffers from data races between threads that access the same data, eg. rmw_publisher_data_t. There are essentially two classes of races:
One thread destructing the data object and another accessing is modifying it.
Two or more threads are modifying the data object.
Proposal to address the issue
Update all data classes to rely on getters and setters to access members while locking mutexes.
The type erased data fields in rmw types, eg rmw_publisher_t->data will store the raw pointer to the RMW context. The assumption here is that the context will always be valid if an RMW entity is valid
The rmw_context_impl_s class will store sets/vectors of rmw_x_data_t objects of the various RMW entities (publishers, subs, clients, servers, etc). Two or more threads will lock the same mutex in the rmw_context_impl_s while accessing/modifying these objects.
The text was updated successfully, but these errors were encountered:
The current implementation suffers from data races between threads that access the same data, eg. rmw_publisher_data_t. There are essentially two classes of races:
Proposal to address the issue
rmw_x_data_t
objects of the various RMW entities (publishers, subs, clients, servers, etc). Two or more threads will lock the same mutex in thermw_context_impl_s
while accessing/modifying these objects.The text was updated successfully, but these errors were encountered: