[zeromq-dev] socket passing and thread safety.. a precise exlanation

Apostolis Xekoukoulotakis xekoukou at gmail.com
Sat Oct 20 18:55:13 CEST 2012

The new documentation is very good.

2012/10/20 Pieter Hintjens <ph at imatix.com>

> On Fri, Oct 19, 2012 at 10:08 PM, Apostolis Xekoukoulotakis
> <xekoukou at gmail.com> wrote:
> > So I'd have to create a new context inside such a
> > triggered event. I think I could do it. Passing the sockets,for now,
> might
> > be enough.
> I'd suggest creating a new context in each thread.
> > I think I get confused because it introduces 3 concepts, the agent, the
> zctx
> > object and the pipe that is used to communicate between them.
> Yes, on re-reading that page it's very unclear. I've rewritten it. See
> https://github.com/hintjens/czmq/commit/6788c3222974731de664cc447c2b0d7d0411d6c8
> > Also what does this mean? Monitoring the pipe means that I expect that a
> msg
> > will arrive. When It doesnt arrive, I will have to exit.
> > Does this also mean that I have to generate that msg? (heartbeat)
> It's actually just standard practice on reading _any_ 0MQ socket, if
> you get back a null message it means the process has been interrupted
> and you have to exit whatever loop you're in.
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Sincerely yours,

     Apostolis Xekoukoulotakis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121020/c4ad3232/attachment.htm>

More information about the zeromq-dev mailing list