[zeromq-dev] Tornado loops

Brian Granger ellisonbg at gmail.com
Wed Jan 12 20:06:15 CET 2011


Daniel,

> This is my first post to this list since I only started working with it last week. So far I have to say it is mind-blowing! Thank you for this!

Glad you like it!

> Currently I am using the Python binding and everything works quite nicely so far! When I read about Tornado's eventloop I liked it even more. Now my question: is there some way to use zmq with the 'original' eventloop? Or the other way round? Or should I simply start two different threads for the two eventloops?

The ioloop.py in zmq.eventloop is a full replacement for the ioloop.py
in tornado that adds support for zmq sockets..  You just want one of
these and to use both tcp and zmq sockets you will have to use
zmq.eventloop.ioloop.  But, once you start that event loop, you should
just be able to use the rest of tornado just like normal.  Let us know
if you have problems.  We should probably add an example to pyzmq that
shows how to do this.

Let us know how it goes...

Cheers,

Brian

> The application I am currently writing should get some kind of API or even web interface and for this reason I would like to use Tornado (now that I am using its eventloop)!
>
> Best
> Daniel
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>



-- 
Brian E. Granger, Ph.D.
Assistant Professor of Physics
Cal Poly State University, San Luis Obispo
bgranger at calpoly.edu
ellisonbg at gmail.com



More information about the zeromq-dev mailing list