[zeromq-dev] Need to PUB / REQ from multiple threads
Gaspard Bucher
gaspard at teti.ch
Thu Jan 6 09:26:04 CET 2011
Hi list !
In the application I am using, I would like to create two globally available
features:
1. "notification" (zmq.PUB) that can be used by any running thread without
prior setup to post messages. The notifications are sent out with the
zmq.PUB socket. I have a global mutex so it is guaranteed that not more then
one thread is accessing the "notification" system at the same time.
2. asynchronous "request" (zmq.REQ ?) or message posting to a connected
server from any thread
Is this supported with 2.1 ?
What prevents the calls from moving between threads, apart from
thread-safety (as I said, there is a global mutex) ?
My understanding is that to avoid moving socket calls between threads, I
would need to push/pull inproc sockets (one PUSH for every thread, one PULL
for the REQ/PUB sockets) but this seems like a waist of resources...
Gaspard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110106/fbf94cb7/attachment.htm>
More information about the zeromq-dev
mailing list