[py-dev] new Channel callback

holger krekel hpk at trillke.net
Thu Apr 14 17:49:35 CEST 2005


On Thu, Apr 14, 2005 at 17:41 +0200, Jan Balster wrote:
> holger krekel wrote:
> > On Thu, Apr 14, 2005 at 16:18 +0200, Jan Balster wrote:
> >>if I use the new channel.setcallback I still have to call gateway.exit()
> >>at the end. So I need a thread to wait for the remote side to finish.
> >>
> >>Is there a way to avoid this? Calling gateway.exit() form the callback
> >>would be fine for me, but I'm afraid that won't work.
> > 
> > 
> > Maybe that should work, although the gateway/channel shutdown-process 
> > is rather involved so it might actually not work.  It's worth
> > just testing it out, i'd say. 
> 
> Hurray! It works. But it seems to me, using the callback is slower than
> receiving all items in a loop (13 secs vs. 15 secs).

That would be very odd.  Do you repeatedly get this? 
Btw, i'd recommend to add a test for exiting from a callback
because i am currently revising the threading mechanism :-) 

cheers, 

    holger



More information about the Pytest-dev mailing list