[zeromq-dev] Issue in zGuide

Jacky Wang jacky.chao.wang at gmail.com
Tue Feb 28 20:48:36 CET 2012


Hi there,

I'm reading the ØMQ guide and found an issue in this section:
http://zguide.zeromq.org/page:all#Programming-with-MQ. It says: "In the
end, the problem was that the application was passing sockets between
threads, which crashed weirdly. It became legal behavior in ØMQ/2.1, but
remains dangerous and something we advise against doing."

However:

1) In the sample code, only context is passed between threads.  The sockets
are generated separately in each threads.

2) AFAIK, the zmq_socket is not thread-safe thus could not be passed
around.  Does ØMQ/2.1 removed this limitation?  Otherwise many threads can
easily reuse the same TCP connection...

Comments?

Best,
Jacky
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120229/7cfde509/attachment.htm>


More information about the zeromq-dev mailing list