ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

why "simple message" classes are not thread safe?

asked 2017-12-11 07:09:08 -0500

ManMan88 gravatar image

updated 2017-12-11 07:12:14 -0500

Why does all of the industrial simple message package classes has a warning: THIS CLASS IS NOT THREAD-SAFE? What makes them not thread safe?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-12-11 08:53:04 -0500

gvdhoorn gravatar image

updated 2017-12-11 08:53:46 -0500

What makes them not thread safe?

The message classes are (de)serialising C-structs from/to a byte buffer.

Buffer accesses are not thread safe, as they don't lock any of the resources that they use.

In addition to that reading and writing bytes from/to the network socket file descriptor is not guarded either.

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2017-12-11 07:09:08 -0500

Seen: 133 times

Last updated: Dec 11 '17