[zeromq-dev] Inproc and zero-copy question

Lindley French lindleyf at gmail.com
Wed Feb 5 22:14:56 CET 2014


When a PUSH socket is closed, messages may still be dropped if there is no
PULL socket accepting them, correct?


On Wed, Feb 5, 2014 at 3:44 PM, Lindley French <lindleyf at gmail.com> wrote:

> Hmm. In that case, I may have just discovered the one and only time it
> makes sense to dynamically allocate a smart pointer. Sending the resulting
> raw pointer over inproc would certainly be safe, and memory management
> semantics with guaranteed-deletion could be arranged.
>
>
> On Wed, Feb 5, 2014 at 3:38 PM, Pieter Hintjens <ph at imatix.com> wrote:
>
>> On Wed, Feb 5, 2014 at 9:32 PM, Lindley French <lindleyf at gmail.com>
>> wrote:
>>
>> > 1) Messages will not be moved around with C-style memcpy, etc. I don't
>> know
>> > how weak_ptr (or shared_ptr) would react to this, but it's a bad idea in
>> > general. It can break vtables and stuff like that. I recall reading that
>> > inproc doesn't do any copying, but is this an API guarantee or just an
>> > implementation detail?
>>
>> Inproc certainly may copy message contents on sending. It depends on
>> the API call you use, and I don't think there's a zero-copy receive
>> call at all.
>>
>> > 2) Messages will not be dropped silently. I think PAIR and PUSH/PULL
>> meet
>> > this requirement. Please confirm----there is NO WAY for these types to
>> drop
>> > messages, correct?
>>
>> This is correct, over inproc. Over TCP messages may be lost when
>> underlying connections are broken unexpectedly.
>>
>> -Pieter
>> _______________________________________________
>> 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/20140205/92de5bb4/attachment.htm>


More information about the zeromq-dev mailing list