pyqtSignal is processed after a long time
-
Dear all,
I have a situation which looks like a pyqtSignal is processed after a long time (minutes) after it has been emitted.
Is there a way then to check for pending signals or apply priority to signals or whatever... What is the proper way to do in this situation?
Thanks. -
Dear all,
I have a situation which looks like a pyqtSignal is processed after a long time (minutes) after it has been emitted.
Is there a way then to check for pending signals or apply priority to signals or whatever... What is the proper way to do in this situation?
Thanks. -
@TechMan Signals are only proccessed if the event loop is executed.
So, the question is: do you block the event loop? The event loop can be blocked when you execute a long lasting loop or if you call a blocking function.@jsulm
I do not forcibly block the event loop in any way, but I think there can be just many messages being sent to that event loop, causing a particular signal to wait for a long time. But how to check that to make sure? Is it possible to check message queue somehow?
I work with Python/PyCharm -
@jsulm
I do not forcibly block the event loop in any way, but I think there can be just many messages being sent to that event loop, causing a particular signal to wait for a long time. But how to check that to make sure? Is it possible to check message queue somehow?
I work with Python/PyCharm@TechMan said in pyqtSignal is processed after a long time:
causing a particular signal to wait for a long time
Signals are processed in the same order they were emitted.
How many signals do you emit? How is the system load when your app is running? What is your app doing? -
@TechMan said in pyqtSignal is processed after a long time:
causing a particular signal to wait for a long time
Signals are processed in the same order they were emitted.
How many signals do you emit? How is the system load when your app is running? What is your app doing?How many signals do you emit?
Few signals, but I'm aware that some of message processing functions can be long lasting. So I suspect that messages can accumulate. My question is: is there any mean to check that? Is there any mean to check - how many messages are in the queue at the moment?
-
How many signals do you emit?
Few signals, but I'm aware that some of message processing functions can be long lasting. So I suspect that messages can accumulate. My question is: is there any mean to check that? Is there any mean to check - how many messages are in the queue at the moment?
@TechMan said in pyqtSignal is processed after a long time:
Is there any mean to check - how many messages are in the queue at the moment?
I don't know.
But what you can check is how long processing your messages takes. -
@TechMan said in pyqtSignal is processed after a long time:
Is there any mean to check - how many messages are in the queue at the moment?
I don't know.
But what you can check is how long processing your messages takes. -
How many signals do you emit?
Few signals, but I'm aware that some of message processing functions can be long lasting. So I suspect that messages can accumulate. My question is: is there any mean to check that? Is there any mean to check - how many messages are in the queue at the moment?
@TechMan said in pyqtSignal is processed after a long time:
Is there any mean to check - how many messages are in the queue at the moment?
This has been asked before, and I believe the answer is no, Qt hides that from you.
There is a QSignalSpy class, which can help monitor, but requires you to know/place it on the emitting objects, which is a bit of a pain. Or https://doc.qt.io/GammaRay/ may help, though I never got around to setting it up.