ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

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

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



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

Seen: 106 times

Last updated: Dec 11 '17