From e9b132bbfe89334e4656c2bb3a63693bf85c3ec5 Mon Sep 17 00:00:00 2001 From: SaurabhAgarwala Date: Mon, 23 Dec 2019 18:43:41 +0530 Subject: Termination function implemented --- mainApp.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mainApp.py') diff --git a/mainApp.py b/mainApp.py index be8c3de..139b23c 100644 --- a/mainApp.py +++ b/mainApp.py @@ -170,9 +170,9 @@ class MainApp(QMainWindow,ui): if self.thrd: thread_id = self.thrd.ident print('____________________Going to terminate simulation thread with Thread ID:',thread_id,'____________________') - # print('____________________Going to terminate the new process created for omc____________________') - # self.Container.flowsheet.process.terminate() - # print('____________________New process created for omc is terminated.____________________') + print('____________________Going to terminate the new process created for omc____________________') + self.Container.flowsheet.process.terminate() + print('____________________New process created for omc is terminated.____________________') res = ctypes.pythonapi.PyThreadState_SetAsyncExc(thread_id, ctypes.py_object(SystemExit)) self.textBrowser.append("["+str(self.currentTime())+"] Terminating the simulation ") print('____________________Simulation thread terminated____________________') -- cgit