gevent #287

Merged
Atheros1 merged 19 commits from master into master 2013-07-05 22:59:12 +02:00
Showing only changes of commit 80e5adad8c - Show all commits

View File

@ -2875,14 +2875,16 @@ class myTableWidgetItem(QTableWidgetItem):
def __lt__(self, other): def __lt__(self, other):
return int(self.data(33).toPyObject()) < int(other.data(33).toPyObject()) return int(self.data(33).toPyObject()) < int(other.data(33).toPyObject())
from threading import Thread
class UISignaler(QThread): class UISignaler(Thread,QThread):
def __init__(self, parent=None): def __init__(self, parent=None):
Thread.__init__(self, parent)
QThread.__init__(self, parent) QThread.__init__(self, parent)
def run(self): def run(self):
while True: while True:
try:
command, data = shared.UISignalQueue.get() command, data = shared.UISignalQueue.get()
if command == 'writeNewAddressToTable': if command == 'writeNewAddressToTable':
label, address, streamNumber = data label, address, streamNumber = data
@ -2927,6 +2929,14 @@ class UISignaler(QThread):
else: else:
sys.stderr.write( sys.stderr.write(
'Command sent to UISignaler not recognized: %s\n' % command) 'Command sent to UISignaler not recognized: %s\n' % command)
except Exception,ex:
# uncaught exception will block gevent
import traceback
traceback.print_exc()
traceback.print_stack()
print ex
pass
try: try:
import gevent import gevent
except ImportError as ex: except ImportError as ex: