[rabbitmq-discuss] Using Pika and PyQtGraph (Qt event loop and BlockingConnection)
Femto Trader
femto.trader at gmail.com
Tue May 13 19:50:47 BST 2014
Hello,
thanks for your reply.
I don't know Tornado at all.
I'm not a very talented developer....
Talking to me of "eventlet on pyqt" or "gevent on pyqt" looks like poetry
to me ;-)
Luke also said me something else:
"One solution that will likely work for you is to move your MQ code to a
new thread, and send a signal back to the GUI thread whenever a message
arrives."
Can someone from RabbitMQ dev team be in touch with PyQt / PySide dev teams
and also PyQtGraph devs in order to have a very basic sample example
because displaying realtime
data coming from a messaging queue could be useful.
One basic example could be:
one python script connect to RabbitMQ and send a random number
an other script receive data and plot them into a PyQtGraph.
I'm not very familiar with threading so I wonder
what will happen if thread that will receive data will take more time to
compute data
(do some calculations on these data) than task to display them
Femto
2014-05-13 16:07 GMT+02:00 Ask Solem <ask at rabbitmq.com>:
>
> On May 13, 2014, at 2:54 PM, Michael Klishin <mklishin at gopivotal.com>
> wrote:
>
> > On 12 May 2014 at 00:34:58, Femto (femto.trader at gmail.com) wrote:
> >>> maybe you noticed Qt have an event loop
> >>
> >> and I think it's doing odd things with pika.BlockingConnection
> >>
> >>
> >> Any help is welcome.
> >
> > I doubt that it can, although I know nothing about Qt and little about
> > Pika implementation.
> >
> > Have you tried using a different connect, e.g. Tornado?
>
> If PyQt does indeed use an event loop then you will not be able to use a
> blocking connection.
>
> You have several choices:
>
> 1) Implement a pika connection implementation using the PyQt event loop.
> 2) Use a “eventlet on pyqt” or “gevent on pyqt” implementation like
> eventlet-pyqt
> and use the eventlet or gevent connection in pika.
> 3) Run pyqt in a separate thread. This is only an option if pyqt actually
> supports it, which may
> very well not be the case.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20140513/64e6e8d7/attachment.html>
More information about the rabbitmq-discuss
mailing list