Changeset 2165 for pjproject/trunk/pjsip-apps/src/python/pjsua.py
- Timestamp:
- Jul 21, 2008 10:46:35 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjsip-apps/src/python/pjsua.py
r2163 r2165 153 153 import threading 154 154 import weakref 155 import time 155 156 156 157 class Error: … … 2085 2086 self._lck = lck 2086 2087 self._lck.acquire() 2087 #print 'lck acquire' 2088 #_Trace(('lock acquired',)) 2088 2089 2089 2090 def __del__(self): 2090 self._lck.release() 2091 #print 'lck release' 2091 try: 2092 self._lck.release() 2093 #_Trace(('lock released',)) 2094 except: 2095 #_Trace(('lock release error',)) 2096 pass 2092 2097 2093 2098 … … 2116 2121 _pjsua.destroy() 2117 2122 del self._lock 2118 print 'Lib destroyed'2123 _Trace(('Lib destroyed',)) 2119 2124 2120 2125 def __str__(self): … … 2168 2173 loop = 0 2169 2174 while self._quit != 2 and loop < 400: 2170 self.handle_events(5 0)2175 self.handle_events(5) 2171 2176 loop = loop + 1 2177 time.sleep(0.050) 2172 2178 _pjsua.destroy() 2173 2179 _lib = None … … 2181 2187 2182 2188 """ 2189 lck = self.auto_lock() 2183 2190 err = _pjsua.start() 2184 2191 self._err_check("start()", self, err) … … 2850 2857 def _worker_thread_main(arg): 2851 2858 global _lib 2859 _Trace(('worker thread started..',)) 2852 2860 thread_desc = 0; 2853 2861 err = _pjsua.thread_register("python worker", thread_desc) 2854 2862 _lib._err_check("thread_register()", _lib, err) 2855 2863 while _lib and _lib._quit == 0: 2856 _lib.handle_events(50) 2864 _lib.handle_events(1) 2865 time.sleep(0.050) 2857 2866 if _lib: 2858 2867 _lib._quit = 2 2868 _Trace(('worker thread exited..',)) 2859 2869 2860 2870 def _Trace(args): … … 2864 2874 print arg, 2865 2875 print " **" 2876
Note: See TracChangeset
for help on using the changeset viewer.