From 4f17155eae5b81246e8172a80b9421ec0ad22bed Mon Sep 17 00:00:00 2001 From: Thomas Friedrichsmeier Date: Tue, 12 Jan 2021 09:21:29 +0100 Subject: [PATCH] Fix hang on exit. (Not sure, whether there are other potential hang conditions on exit, but this is one.) BUG: 430680 --- rkward/rbackend/rkrbackendprotocol_frontend.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 (); } -- GitLab