[zeromq-dev] Migrating ZMQ sockets acrossing threads

Kah-Chan Low kahchanlow at yahoo.com
Thu Oct 25 19:03:14 CEST 2012


Hi,
If I create a ZMQ socket, do not touch it direct or indirectly after this, and spawn a thread and hand over the pointer of socket to the new thread.
The new thread is the only thread that perform operations on the socket, including deleting the socket.
Is this the right way to migrate the socket across 2 threads?
zmq_socket reference manual talks about using "full fence" memory barrier to do this.
Do I really need to do this for my simple example?

Thanks!
kc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121025/1cabb5c7/attachment.htm>


More information about the zeromq-dev mailing list