Re: [Txamqp-user] How do you listen to different queues asynchronously?

2009-11-17 Thread Ale
Hi Esteve,

2009/11/17 Esteve Fernandez esteve.fernan...@gmail.com:
 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.

___
Mailing list: https://launchpad.net/~txamqp-user
Post to : txamqp-user@lists.launchpad.net
Unsubscribe : https://launchpad.net/~txamqp-user
More help   : https://help.launchpad.net/ListHelp


Re: [Txamqp-user] How do you listen to different queues asynchronously?

2009-11-17 Thread Terry Jones
 Esteve == Esteve Fernandez esteve.fernan...@gmail.com writes:
Esteve there's probably something I'm missing here, but why are you
Esteve defining a function and attaching it to an errback if you're
Esteve already using inlineCallbacks? This looks cleaner to me:

I wasn't understanding Ale's situation. We talked later on IRC and I told
him to do as you suggest - just wrap in a try/except.

T

___
Mailing list: https://launchpad.net/~txamqp-user
Post to : txamqp-user@lists.launchpad.net
Unsubscribe : https://launchpad.net/~txamqp-user
More help   : https://help.launchpad.net/ListHelp