mosquitto_lib_init thread-safe or only to be called once per process?
Asked by
Tommy Svensson
Hi,
I got a segmentation fault in mosquitto_lib_init when it was called simultaneously from two different threads. Guarding mosquitto_lib_init with a mutex made the fault go away.
Now I wonder, is the mosquitto_lib_init to be called only once for each process? Or is to be called once for each thread, in which case it must be thread-safe, which it looks like it isn't. The docs says that mosquitto is thread-safe though.
Can you please clarify!
Kind regards,
/Tommy
Env: mosquitto v1.2.3 on Ubuntu 13.04
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- mosquitto Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Tommy Svensson for more information if necessary.
To post a message you must log in.