Sponsor: VoiceMeUp - Corporate & Wholesale VoIP Services

VoIP Mailing List Archives
Mailing list archives for the VoIP community
 SearchSearch 

[asterisk-users] pyAsterisk: how to gracefully exit from event loop


 
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users
View previous topic :: View next topic  
Author Message
oza.4h07 at gmail.com
Guest





PostPosted: Wed Feb 12, 2014 4:42 am    Post subject: [asterisk-users] pyAsterisk: how to gracefully exit from eve Reply with quote

Hello,


I'm using py-Asterisk 0.5.3.

I'm trying to use it along a Tkinter-based GUI so I've dedicated a thread for reading incoming AMI events.


Which is the preferred way to gracefully exit from an event loop ?
More precisely:




This thread is waiting for input events with Manager._read_packet() method.

Doc (see [1]) says:
"... infinite loop running BaseManager.read() until an exception occurs (for example, SystemExit is raised) or until sys.exit() is called"



The best method I could find is to close Manager connection and catch exception.


Any advice ?



Regards




[1] http://py-asterisk.googlecode.com/hg-history/242456f432f2fa2727b26d648bcf7dc502fdcc51/doc/GUIDE.html
Back to top
Display posts from previous:   
Post new topic   Reply to topic    VoIP Mailing List Archives Forum Index -> Asterisk Users All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group

VoiceMeUp - Corporate & Wholesale VoIP Services