[zeromq-dev] Dropping connection end points dynamically

Chuck Remes lists at chuckremes.com
Thu Apr 19 18:38:50 CEST 2012


He was just reiterating that you should use a mutex. A mutex will perform a full memory barrier for you. I don't know why this community is so caught up on using the term "memory barrier" when *in practice* they mean to say "mutex." Just use a mutex properly and all will be well.

Feel free to read the FAQ too. This question is covered there.

cr

On Apr 19, 2012, at 11:34 AM, Radha Krishna Srimanthula wrote:

> Thanks for the reply Pieter,
> 
> Can you please help me with more information about performing a full memory barrier? Frankly, hearing it for the first time.
> 
> --
> Regards,
> Radha
> 
> 
> 
> On Thu, Apr 19, 2012 at 8:41 AM, Pieter Hintjens <ph at imatix.com> wrote:
> On Wed, Apr 18, 2012 at 5:09 PM, Radha Krishna Srimanthula
> <srimanthula.radhakrishna at gmail.com> wrote:
> 
> > Just to restate - would it be ok to create a socket in a main thread - only
> > once, perform subscriptions/ unsubscriptions in another, and perform sends
> > on the yet another thread?
> 
> Yes, you can migrate sockets between threads but you MUST do a full
> memory barrier between operations.
> 
> -Pieter
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
> 
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120419/ab085fe8/attachment.htm>


More information about the zeromq-dev mailing list