summaryrefslogtreecommitdiff
path: root/src/projManagement
diff options
context:
space:
mode:
authorrahulp132020-08-03 12:56:18 +0530
committerrahulp132020-08-03 12:56:18 +0530
commit2881a8103f374a04b7744a1c846a9097a0b5e4e8 (patch)
tree781a624569f1c1646826939922a3a3a800405c06 /src/projManagement
parenta236dc440e2242cc9b0005befb56c84980a4ca47 (diff)
downloadeSim-2881a8103f374a04b7744a1c846a9097a0b5e4e8.tar.gz
eSim-2881a8103f374a04b7744a1c846a9097a0b5e4e8.tar.bz2
eSim-2881a8103f374a04b7744a1c846a9097a0b5e4e8.zip
wait for threads (if greater than 1) to finish before objects are destroyed
Diffstat (limited to 'src/projManagement')
-rw-r--r--src/projManagement/Worker.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/projManagement/Worker.py b/src/projManagement/Worker.py
index 78e02bbf..cdad4170 100644
--- a/src/projManagement/Worker.py
+++ b/src/projManagement/Worker.py
@@ -13,12 +13,13 @@
# MODIFIED: Rahul Paknikar, rahulp@iitb.ac.in
# ORGANIZATION: eSim Team at FOSSEE, IIT Bombay
# CREATED: Tuesday 24 February 2015
-# REVISION: Sunday 26 July 2020
+# REVISION: Sunday 02 August 2020
# =========================================================================
from PyQt5 import QtCore
import subprocess
from configuration.Appconfig import Appconfig
+import threading
class WorkerThread(QtCore.QThread):
@@ -52,7 +53,8 @@ class WorkerThread(QtCore.QThread):
@return
None
"""
- self.wait()
+ if threading.active_count() > 1:
+ self.wait()
def get_proc_threads(self):
"""