summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Golubev <fatzer2@gmail.com>2025-12-14 10:56:08 +0300
committerFat-Zer <fatzer2@gmail.com>2025-12-16 22:01:24 +0000
commit65da4c717517fdb2066a7887f64b63fd9e4d3bd1 (patch)
tree9ca368cf96f5c00c4e14230064ea89d5c792a106 /src
parentb07f1d41388a05ad47bfce8279a663ae4c7d7bf5 (diff)
downloaddbus-1-tqt-master.tar.gz
dbus-1-tqt-master.zip
Implicitly process messages that arrived while awaiting for replyHEADmaster
This changes the behaviour of TQT_DBusConnection::sendWithReply(): before the patch in case some message arrives while awaiting for a reply in dbus_connection_send_with_reply_and_block(), they were enqueued and won't be processed until some other message kicks it on or a user explicitly called scheduleDispatch() or dispatch(). This commit adds an implicit call to scheduleDispatch() to avoid unexpected delays in processing incoming messages. Signed-off-by: Alexander Golubev <fatzer2@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/tqdbusconnection.cpp2
-rw-r--r--src/tqdbusconnection.h5
2 files changed, 5 insertions, 2 deletions
diff --git a/src/tqdbusconnection.cpp b/src/tqdbusconnection.cpp
index f61f2f2..76be5be 100644
--- a/src/tqdbusconnection.cpp
+++ b/src/tqdbusconnection.cpp
@@ -297,6 +297,8 @@ TQT_DBusMessage TQT_DBusConnection::sendWithReply(const TQT_DBusMessage &message
ret.d->error.setDBUSError(dbus_error_set);
if (error) error->setDBUSError(dbus_error_set);
+ d->scheduleDispatch();
+
return ret;
}
diff --git a/src/tqdbusconnection.h b/src/tqdbusconnection.h
index 20e04c4..a1696a9 100644
--- a/src/tqdbusconnection.h
+++ b/src/tqdbusconnection.h
@@ -374,8 +374,9 @@ public:
*
* Sends a message composed through the TQT_DBusMessage API to the bus.
* It then blocks and waits until the associated reply is received.
- * Any message received in between is stored and can be processed
- * by calling dispatch() or scheduleDispatch()
+ * Any message received in between is stored and will be processed when
+ * control flow reaches event loop for the next time. Alternatively it can
+ * be processed earlier by calling dispatch().
*
* @note for doing method calls it is more convenient to use TQT_DBusProxy,
* see TQT_DBusProxy::sendWithReply()