[zeromq-dev] Is there advantage of using zmq_device comparable with polling
MinRK
benjaminrk at gmail.com
Thu May 17 00:39:59 CEST 2012
On Wed, May 16, 2012 at 3:07 PM, Michel Pelletier <
pelletier.michel at gmail.com> wrote:
> I'm not entirely sure I follow your question, but yes, in general it's
> easy to create your own simple devices. A forwarder can be easily
> implemented with poll(). The built in devices would probably be
> faster than the same thing written in a higher level language like
> Python.
>
Not only faster, but there is a significant advantage in Python (and, I
imagine, other interpreted languages) that the builtin zmq_device is
pure-C, and thus entirely GIL-less. This is a huge advantage when running
in a background thread, or multiple devices in a single process without
contending over the GIL.
That said, the value is debatable in libzmq itself, hence the occasional
proposals that they be removed (and indeed have been removed, and
ultimately restored).
-MinRK
>
> -Michel
>
> On Wed, May 16, 2012 at 3:03 PM, Serg V. Gulko <s.gulko at gmail.com> wrote:
> > Hello!
> >
> > I trying to figure out is there any advantage(except more compact
> notation)
> > of using ZMQ_FORWARDER device as long same stuff can be build using
> > zmq_poll.
> >
> > Serg
> >
> >
> >
> >
> > _______________________________________________
> > 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/20120516/cb8c0f93/attachment.htm>
More information about the zeromq-dev
mailing list