[zeromq-dev] Issue in zGuide
jacky.chao.wang at gmail.com
Tue Feb 28 20:48:36 CET 2012
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."
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...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zeromq-dev