[zeromq-dev] connect from a different thread
Gaspard Bucher
gaspard at teti.ch
Sun Jan 2 09:59:47 CET 2011
I have a zmq.SUB socket handling remote messages in thread A. It spends most
of its time in recv().
Some other thread B running mDNS finds services and I want it to connect the
subscriber (created in thread A) to the remote end.
Is it ok to connect from a different thread ?
Is it ok to connect while the socket is in recv() ?
If not, one solution I see would be to connect the subscriber to an ipc
socket (created in the mDNS loop) to receive connection info. Is this the
way to handle such a pattern ?
Cheers,
Gaspard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20110102/94082a25/attachment.htm>
More information about the zeromq-dev
mailing list