txamqp-user team mailing list archive
-
txamqp-user team
-
Mailing list archive
-
Message #00047
Re: How do you listen to different queues asynchronously?
Hi Esteve,
2009/11/17 Esteve Fernandez <esteve.fernandez@xxxxxxxxx>:
> and then, when the user quits the application, put the STOP_TOKEN
> object in the queue:
>
> queue.put(STOP_TOKEN)
>
> remember that when you call queue() on a channel instance, you get an
> instance of DeferredQueue
> (http://twistedmatrix.com/documents/8.2.0/api/twisted.internet.defer.DeferredQueue.html),
> so you're free to put whatever you want in it without having to send
> anything through the network :-)
>
That's a very good idea. I think it's much cleaner than raising an
exception or the stuff with the deferreds.
Thanks a lot Esteve.
it's admirable your (Terry and you) efforts to help strangers on the
internet :-)
--
Ale.
References