[zeromq-dev] Inproc and zero-copy question

Pieter Hintjens pieterh at gmail.com
Thu Feb 6 11:14:18 CET 2014


Depending on the linger setting, yes.
On Feb 5, 2014 10:15 PM, "Lindley French" <lindleyf at gmail.com> wrote:

> 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
>>>
>>
>>
>
> _______________________________________________
> 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/20140206/b523e90e/attachment.htm>


More information about the zeromq-dev mailing list