[Freeswitch-users] mod_event_zmq thread safety
Alex Massover
alex at jajah.com
Thu Aug 16 23:23:32 MSD 2012
Hello,
We're using mod_event_zmq module (slightly modified, we use different socket type and IPC instead of TCP), and experience crashes.
As far as I understood the module it creates ZMQ context and all event sent by using same context.
Events callback is called from different threads, isn't it? And can be a situation when different threads access send() api on this context simultaneously.
ZMQ guide strongly prohibits doing that: " You MUST NOT share ØMQ sockets between threads."
And when I do a mutex around send() there're no more crashes (at least today).
Am I missing something or mod_event_zmq is potentially dangerous?
--
Best Regards,
Alex Massover
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-users
mailing list