txamqp-user team mailing list archive
-
txamqp-user team
-
Mailing list archive
-
Message #00042
Re: How do you listen to different queues asynchronously?
2009/11/15 Terry Jones <terry@xxxxxxxxxxxxx>:
Hi Terry,
Thanks for your response
> If you want a deferred that fires with the first of n other deferreds, you
> can just do this:
>
> from twisted.internet import defer
>
> d = defer.DeferredList([def1, def2], fireOnOneCallback=True)
I'll look into it and see if that helps.
I was looking for a way to stop the:
while True:
msg = yield queue.get()
What should I do if the loop is just stuck in yield queue.get() and I
want to cancel it?
My program is a GTK2 app that keeps listening to messages and I would
like to stop listening when I close the app. So I "invented" that. The
trouble with it is that queue.get() throws Closed so I have to add an
errback to trap it.
All try out your sugestion, thanks Terry.
Cheers,
--
Ale.
Follow ups
References