[zeromq-dev] Malamute and old zmq api
Kenneth Adam Miller
kennethadammiller at gmail.com
Fri Apr 10 19:38:51 CEST 2015
During some late night coding, I aggressively rewrote the entire library.
On Apr 10, 2015 12:46 PM, "Joe McIlvain" <joe.eli.mac at gmail.com> wrote:
> Kenneth,
>
> It may not be necessary to share the same context. The most common reason
> to require using the same context is inproc communication - if you can use
> ipc instead, that may be your best solution.
>
> On Thu, Apr 9, 2015 at 9:52 PM, Kenneth Adam Miller <
> kennethadammiller at gmail.com> wrote:
>
>> Hmm, I've read the class to be thorough, and it seems that there
>> certainly isn't any way to just replace the singleton that I've written.
>> Any other work-arounds??
>>
>> On Thu, Apr 9, 2015 at 10:46 PM, Kenneth Adam Miller <
>> kennethadammiller at gmail.com> wrote:
>>
>>> Ah ok. Thanks, I saw that function, but it was marked deprecated, and it
>>> seems that there have been several stabs at context management in the apis
>>> just wanted to be sure. Previously, I wrote my own implementation of a
>>> singleton; I will replace the singleton getter with a call to zsys_init(),
>>> but I still need to return a zmq::context_t; how to I properly box that
>>> type up to make it look to callers to be and function the same without
>>> having to refactor the whole system?
>>>
>>> On Thu, Apr 9, 2015 at 10:17 PM, Joe McIlvain <joe.eli.mac at gmail.com>
>>> wrote:
>>>
>>>> Kenneth,
>>>>
>>>> I'd think the only thing to worry about is the zeromq contexts. Not
>>>> sure if you're trying to use them together to interoperate or just have
>>>> them compiled together, but CZMQ uses a single global context, which you
>>>> can access to share by calling zsys_init() (safe to call multiple times,
>>>> always returns the same global context).
>>>>
>>>> Many applications use the low-level ZMQ API when the CZMQ high-level
>>>> wrappers don't cover their use case - one oft-used example is advanced uses
>>>> of zmq_poll.
>>>>
>>>> On Thu, Apr 9, 2015 at 6:21 PM, Kenneth Adam Miller <
>>>> kennethadammiller at gmail.com> wrote:
>>>>
>>>>> Suppose we wanted to make use of malamute in a large project that had
>>>>> been using zmq.hpp for a long time. Malamute uses czmq, and for good
>>>>> reason. It's much better. What's the best way to go about ensuring that the
>>>>> two apis can be used safely?
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>>
>>>
>>
>> _______________________________________________
>> 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/20150410/197f31ca/attachment.htm>
More information about the zeromq-dev
mailing list