[education/rkward] rkward/rbackend: Fix hang on exit.

Thomas Friedrichsmeier null at kde.org
Tue Jan 12 08:22:36 GMT 2021


Git commit 4f17155eae5b81246e8172a80b9421ec0ad22bed by Thomas Friedrichsmeier.
Committed on 12/01/2021 at 08:21.
Pushed by tfry into branch 'master'.

Fix hang on exit.

(Not sure, whether there are other potential hang conditions on exit, but this is one.)

BUG: 430680

M  +1    -1    rkward/rbackend/rkrbackendprotocol_frontend.cpp

https://invent.kde.org/education/rkward/commit/4f17155eae5b81246e8172a80b9421ec0ad22bed

diff --git a/rkward/rbackend/rkrbackendprotocol_frontend.cpp b/rkward/rbackend/rkrbackendprotocol_frontend.cpp
index c46ed5de..e5cf5d68 100644
--- a/rkward/rbackend/rkrbackendprotocol_frontend.cpp
+++ b/rkward/rbackend/rkrbackendprotocol_frontend.cpp
@@ -42,7 +42,7 @@ RKRBackendProtocolFrontend::~RKRBackendProtocolFrontend () {
 	RKFrontendTransmitter::instance ()->wait(1000);  // Wait for thread to catch the backend's exit request, and exit()
 	RKFrontendTransmitter::instance ()->quit();      // Tell it to quit, otherwise
 	RKFrontendTransmitter::instance ()->wait(3000);  // Wait for thread to quit and clean up.
-	qApp->processEvents();                           // Not strictly needed, but avoids some mem leaks on exit by handling all posted BackendExit events
+	qApp->processEvents(QEventLoop::AllEvents, 500); // Not strictly needed, but avoids some mem leaks on exit by handling all posted BackendExit events
 	delete RKFrontendTransmitter::instance ();
 }
 




More information about the rkward-tracker mailing list