Quantcast
Channel: Active questions tagged zeromq - Stack Overflow
Viewing all articles
Browse latest Browse all 193

Create NetMQ Socket on one thread and operate on another?

$
0
0

I understand that NetMQ sockets are not thread safe. I'm trying to understand the exact boundaries of this. Must all access to a socket (creation, connect/bind and send/receive) be on the same thread? Or is it safe to create on one thread then pass that socket to another thread for send/receive operations? This is what appears to happen with the use of poller. What about connect, is it safe to create on one thread, connect and then pass the socket to another thread for send/receive? I guess I could just go read the code, but I'm interested in the intent of the developers. From my experiments it appears that the library does not enforce single threading with any runtime checks.


Viewing all articles
Browse latest Browse all 193

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>