Hello, In a PyQT program, there is two classes, one derived from QThread, and one in the main GUI thread.
A slot of the GUI thread's class is connected to a QThread signal, and it
seems that this is very slow to emit signal and/or call slot. This result
happens with an empty slot method too.
The hotshot profiler confirms that, the main thread is in the empty slot 70% of
time (and is called only 16 times).
class UDPStreamingThread(QThread):
def __init__(self):
QThread.__init__(self)
def run(self):
while 1:
# get some data from socket
self.emit(SIGNAL('messageReceived'), data)
class UDPStreamingReceiver(QObject):
def __init__(self, client):
QObject.__init__(self)
self.thread = UDPStreamingThread()
self.connect(self.thread, SIGNAL('messageReceived'),
self.messageReceived)
def messageReceived(self, data):
return
Regards,
--
Romain Bignon -- http://romain.peerfuse.org
http://peerfuse.org
pgpfKd3j31am7.pgp
Description: PGP signature
_______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
