gevent #287
|
@ -2875,14 +2875,16 @@ class myTableWidgetItem(QTableWidgetItem):
|
|||
def __lt__(self, other):
|
||||
return int(self.data(33).toPyObject()) < int(other.data(33).toPyObject())
|
||||
|
||||
|
||||
class UISignaler(QThread):
|
||||
from threading import Thread
|
||||
class UISignaler(Thread,QThread):
|
||||
|
||||
def __init__(self, parent=None):
|
||||
Thread.__init__(self, parent)
|
||||
QThread.__init__(self, parent)
|
||||
|
||||
def run(self):
|
||||
while True:
|
||||
try:
|
||||
command, data = shared.UISignalQueue.get()
|
||||
if command == 'writeNewAddressToTable':
|
||||
label, address, streamNumber = data
|
||||
|
@ -2927,6 +2929,14 @@ class UISignaler(QThread):
|
|||
else:
|
||||
sys.stderr.write(
|
||||
'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:
|
||||
import gevent
|
||||
except ImportError as ex:
|
||||
|
|
Reference in New Issue
Block a user